-
Notifications
You must be signed in to change notification settings - Fork 199
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
Add Quartz and Apache Camel preview instrumentations #1899
Conversation
@@ -71,11 +71,17 @@ static Config getConfig(Configuration config) { | |||
if (!config.instrumentation.springScheduling.enabled) { | |||
properties.put("otel.instrumentation.spring-scheduling.enabled", "false"); | |||
} | |||
if (!config.preview.instrumentation.apacheCamel.enabled) { | |||
properties.put("otel.instrumentation.apache-camel.enabled", "false"); |
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.
this is off by default.. should check for enabled and then set it to true?
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.
otel.instrumentation.apache-camel.enabled
is true by default
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.
DisabledByDefaultInstrumentation is disabled by default. If it's true, this object doesn't seem right.
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.
I'm not following, can you make a specific suggestion?
if (config.preview.instrumentation.grizzly.enabled) { | ||
// grizzly instrumentation is off by default | ||
// TODO (trask) investigate if grizzly instrumentation can be enabled upstream by default now | ||
properties.put("otel.instrumentation.grizzly.enabled", "true"); | ||
} | ||
if (!config.preview.instrumentation.quartz.enabled) { | ||
properties.put("otel.instrumentation.quartz.enabled", "false"); |
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.
same here.
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.
same here
@@ -49,7 +49,9 @@ | |||
SPRING_INTEGRATION_DISABLED(19), | |||
LEGACY_PROPAGATION_DISABLED(20), | |||
GRIZZLY_DISABLED(21), // preview instrumentation | |||
STATSBEAT_DISABLED(22); // disable non-essential statsbeat | |||
STATSBEAT_DISABLED(22), // disable non-essential statsbeat | |||
QUARTZ_DISABLED(23), // preview instrumentation |
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.
QUARTZ_ENABLED?
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.
just following existing convention, do u want to change it for grizzle and spring integration also?
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.
grizzly is disabled by default though. which convention are you referring 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, GRIZZLY_ENABLED makes more sense in this case.
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.
all preview instrumentations are disabled by default
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.
except statsbeat is on by default. check overrideconfig, grizzly check enabled and then set it because its default is false.
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.
Can I suggest that you push commit to this PR to update Statsbeat tracking to the way you would like it to be?
STATSBEAT_DISABLED(22); // disable non-essential statsbeat | ||
STATSBEAT_DISABLED(22), // disable non-essential statsbeat | ||
QUARTZ_DISABLED(23), // preview instrumentation | ||
APACHE_CAMEL_DISABLED(24); // preview instrumentation |
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.
APACHE_CAMEL_ENABLED?
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.
just following convention, do you want to change it for existing too?
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.
yes, please.
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.
or i can clean up after your pr, just fix yours for now. i think other instrumentations were moved recently from instrumentation to preview.
@@ -129,9 +129,15 @@ void trackConfigurationOptions(Configuration config) { | |||
} | |||
|
|||
// preview instrumentation | |||
if (!config.preview.instrumentation.apacheCamel.enabled) { |
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.
check enabled not negation?
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.
again, just following convention, let me know if you want to change it for existing too
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.
feature tracking is based on default value.. if it's off by default, we track on; on by default, we track off..
in this case, DisabledByDefaultInstrumentation is off by default.. here only check for false, which seems wrong.
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.
I agree what you suggest would be better, but that's not how current features work, do you want me to change the existing convention?
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.
i think it's because moving config from instrumentation to preview make it confusing.. under instrumentation, it's on by default.. now preview default is off.. once it moves to preview, we change the default value.. that's why feature needs to be updated as well to reflect this change.
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.
@heyams please send a commit to this PR to update statsbeat the way you want it
if (!config.preview.instrumentation.grizzly.enabled) { | ||
featureList.add(Feature.GRIZZLY_DISABLED); | ||
} | ||
if (!config.preview.instrumentation.quartz.enabled) { |
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.
same here.
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.
same here
@@ -39,6 +39,7 @@ dependencies { | |||
exclude("ch.qos.logback", "logback-core") | |||
} | |||
|
|||
implementation("io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-apache-camel-2.20:$otelInstrumentationAlphaVersion") |
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.
do we need to add this to the instrumentation list?
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.
isn't that what this does?
INSTRUMENTATION_MAP.put("io.opentelemetry.quartz-2.0", 70);
INSTRUMENTATION_MAP.put("io.opentelemetry.apache-camel-2.20", 71);
@@ -106,6 +107,7 @@ dependencies { | |||
implementation("io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-opentelemetry-annotations-1.0:$otelInstrumentationAlphaVersion") | |||
implementation("io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-opentelemetry-api-1.0:$otelInstrumentationAlphaVersion") | |||
implementation("io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-opentelemetry-api-metrics-1.0:$otelInstrumentationAlphaVersion") | |||
implementation("io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-quartz-2.0:$otelInstrumentationAlphaVersion") |
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.
instrumentation list?
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.
isn't that what this does?
INSTRUMENTATION_MAP.put("io.opentelemetry.quartz-2.0", 70);
INSTRUMENTATION_MAP.put("io.opentelemetry.apache-camel-2.20", 71);
if (config.preview.instrumentation.apacheCamel.enabled) { | ||
// apache-camel instrumentation is off by default | ||
properties.put("otel.instrumentation.apache-camel.enabled", "true"); |
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.
this won't work, apache-camel
is enabled by default in otel
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.
that's the confusing part.. preview instrumentation is off by default. are you saying that otel will enable it by disregarding the json config setting?
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.
where is the otel code to enable it?
are you saying that, DisabledByDefaultInstrumentation is off by default, but otel turned it on at runtime.
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.
core otel instrumentation is on by default. our configuration layer reverses that for our distro
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.
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.
i only found apache camel and grizzly in that list.. quartz and springIntegration are not mentioned though.
if (config.preview.instrumentation.quartz.enabled) { | ||
// quartz instrumentation is off by default | ||
properties.put("otel.instrumentation.quartz.enabled", "true"); | ||
} | ||
if (!config.preview.instrumentation.springIntegration.enabled) { | ||
properties.put("otel.instrumentation.spring-integration.enabled", "false"); | ||
if (config.preview.instrumentation.springIntegration.enabled) { | ||
// springIntegration instrumentation is off by default | ||
properties.put("otel.instrumentation.spring-integration.enabled", "true"); |
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.
same with these
GRIZZLY_DISABLED(21), // preview instrumentation | ||
GRIZZLY_ENABLED(21), // preview instrumentation, grizzly is OFF by default in OTEL |
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.
@heyams just a heads up, I'm hoping this changes, and grizzly instrumentation can be on by default in the future, not sure if it changes your thoughts on tracking or not though
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.
that's fine.. when that happens, i can rename to disabled then and update featurestatsbeat accordingly.
we want to track the non-default config settings.
Resolves #1897
Resolves #1898