-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename AppSignals configs with backward compatibility #744
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,8 +48,9 @@ | |
* <li>Add AwsMetricAttributesSpanExporter to add more attributes to all spans. | ||
* </ul> | ||
* | ||
* <p>You can control when these customizations are applied using the property otel.smp.enabled or | ||
* the environment variable OTEL_SMP_ENABLED. This flag is enabled by default. | ||
* <p>You can control when these customizations are applied using the property | ||
* otel.aws.app.signals.enabled or the environment variable OTEL_AWS_APP_SIGNALS_ENABLED. This flag | ||
* is disabled by default. | ||
*/ | ||
public class AwsAppSignalsCustomizerProvider implements AutoConfigurationCustomizerProvider { | ||
private static final Duration DEFAULT_METRIC_EXPORT_INTERVAL = Duration.ofMinutes(1); | ||
|
@@ -63,7 +64,8 @@ public void customize(AutoConfigurationCustomizer autoConfiguration) { | |
} | ||
|
||
private boolean isSmpEnabled(ConfigProperties configProps) { | ||
return configProps.getBoolean("otel.smp.enabled", false); | ||
return configProps.getBoolean( | ||
"otel.aws.app.signals.enabled", configProps.getBoolean("otel.smp.enabled", false)); | ||
} | ||
|
||
private Sampler customizeSampler(Sampler sampler, ConfigProperties configProps) { | ||
|
@@ -79,7 +81,8 @@ private SdkTracerProviderBuilder customizeTracerProviderBuilder( | |
logger.info("Span Metrics Processor enabled"); | ||
String smpEndpoint = | ||
configProps.getString( | ||
"otel.aws.smp.exporter.endpoint", "http://cloudwatch-agent.amazon-cloudwatch:4317"); | ||
"otel.aws.app.signals.exporter.endpoint", | ||
configProps.getString("otel.aws.smp.exporter.endpoint", "http://localhost:4315")); | ||
Comment on lines
+84
to
+85
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I recall "cloudwatch-agent.amazon-cloudwatch" being an intentional decision. Can you elaborate more on why we want to switch to localhost? You say it doesn't work because "it points to CW pod in EKS environment." I'm not following the argument.
Can you provide a reference for this claim? Public docs/etc? Also this seems to be somewhat tied to HTTP/gRPC changes discussed in #728 IMO, it would be better to untangle these somewhat controversial changes from the (hopefully) not controversial change to property names. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me try to explain this in 2 parts:
So the default address There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm I see the argument. This aligns with public documentation which tells customers to manually set |
||
Duration exportInterval = | ||
configProps.getDuration("otel.metric.export.interval", DEFAULT_METRIC_EXPORT_INTERVAL); | ||
logger.log(Level.FINE, String.format("Span Metrics endpoint: %s", smpEndpoint)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets update the comment above AwsAppSignalsCustomizerProvider, too:
to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. done