Skip to content
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

Rewrite OpenTelemetry properties to OTel prefix #48

Merged
merged 1 commit into from
Sep 5, 2023
Merged

Conversation

gsmet
Copy link
Member

@gsmet gsmet commented Sep 5, 2023

Fixes quarkusio/quarkus#32064

Note that I haven't handled Yaml config files as it doesn't work very well when adding a new prefix (it does not separate configuration properties on dots and thus doesn't work properly with Quarkus).

/cc @rsvoboda

@brunobat could you check it makes sense?

Comment on lines 41 to 43
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: quarkus.opentelemetry.tracer.sampler.ratio
newPropertyKey: quarkus.otel.traces.sampler.arg
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those properties showed up previously. The full explanation is here: https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.0#extension-re-write
The sampler properties were re-writen and they don't map 1-1 with the older ones.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they don't map 1-1 and we can't rewrite them, we shouldn't include them. It's only this one that I should remove or there are others that won't work properly if they are rewritten?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the sample related ones... The others should be fine.

Copy link

@brunobat brunobat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are missing properties:

"quarkus.otel.propagators", "quarkus.opentelemetry.propagators"
"quarkus.otel.resource.attributes", "quarkus.opentelemetry.tracer.resource-attributes"

See: io.quarkus.opentelemetry.runtime.config.OTelFallbackConfigSourceInterceptor

Fixes quarkusio/quarkus#32064

Note that I haven't handled Yaml config files as it doesn't work very
well when adding a new prefix (it does not separate configuration
properties on dots and thus doesn't work properly with Quarkus).
@gsmet
Copy link
Member Author

gsmet commented Sep 5, 2023

@brunobat I removed the sampler ones and added the ones you mentioned. Let me know if that works for you.

Copy link

@brunobat brunobat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gsmet, It looks ok to me.

@gsmet gsmet merged commit 7d8aa53 into quarkusio:main Sep 5, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include OpenTelemetry configuration mapping in upgrade recipes
2 participants