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

Update azure-core-tracing-opentelemetry version and fix sync suppression #10350

Merged
merged 5 commits into from
Feb 1, 2024

Conversation

lmolkova
Copy link
Contributor

@lmolkova lmolkova commented Jan 30, 2024

This PR updates azure-core-tracing-opentelemetry to version 1.0.0-beta.42 - the latest (from beta.32).
Versions in between don't contain breaking changes that affect OpenTelemetry, but contains some bug fixes including Azure/azure-sdk-for-java#33836

In addition to version update, this PR fixes HTTP span double-collection for synchronous HTTP requests.

Tested manually.

/cc @trask

@lmolkova lmolkova requested a review from a team as a code owner January 30, 2024 00:20
@@ -24,7 +24,7 @@ sourceSets {
dependencies {
compileOnly(project(":instrumentation:azure-core:azure-core-1.36:library-instrumentation-shaded", configuration = "shadow"))

library("com.azure:azure-core:1.36.0")
library("com.azure:azure-core:1.45.1")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is not really necessary and just keeps azure-core in sync with azure-core-tracing-opentelemetry. azure-core is not shaded and is compatible with old version.

So 1.36 is still the min valid version for this code, but should I also update the project name since I'm changing the current lib version?

Copy link
Member

Choose a reason for hiding this comment

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

I'd keep 1.36.0 here, tests are already run against latest version of library dependencies

Copy link
Contributor

Choose a reason for hiding this comment

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

This version here is only really used for compiling, the version used for tests is in testAzure task. We are using testAzure instead of test because the shaded azure-core-tracing-opentelemetry dependency ended in test classpath due to which it was hard to verify whether these classes are found from the agent as they should be of from the test classpath.
Looking at the failures I think we need to introduce azure-core-1.40 module, the new azure-core-tracing-opentelemetry isn't compatible with azure-core-1.36. I'll push adding azure-core-1.40 to this PR, hope you don't mind.

Copy link
Contributor Author

@lmolkova lmolkova Jan 31, 2024

Choose a reason for hiding this comment

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

Thanks a lot @laurit !

the new azure-core-tracing-opentelemetry isn't compatible with azure-core-1.36

it is not but only on the manual configuration path where it never affects the agent.
I was wondering if it's possible to suppress muzzle warning and ignore this specific mismatch.

But I'm going to add another module for azure-core 1.40 or 1.41 in a couple of weeks and we can revisit this.

So thanks a lot for the fix and feel free to merge if you're happy with it.

Copy link
Member

Choose a reason for hiding this comment

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

it looks like muzzle scans all methods in all helper classes

when the helper classes are implemented in this repo we can just remove unused methods (like the OpenTelemetryTracingOptions constructor that is causing issues but isn't needed by the agent instrumentation)

maybe we could "remove" unnecessary methods when we shade the helper classes, but not sure how to do that easily, so splitting out a new module makes sense to me

Copy link
Contributor

Choose a reason for hiding this comment

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

I remove the azure-core-1.40 module and instead replaced the OpenTelemetryTracingOptions that caused muzzle failures with a stub. Please review and decide which approach you like better.

Copy link
Member

Choose a reason for hiding this comment

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

that looks nice to me, thx, will give @lmolkova the final word 👍

Copy link
Contributor Author

@lmolkova lmolkova Feb 1, 2024

Choose a reason for hiding this comment

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

ah nice trick @laurit! Looks great! Give me 30 mins to pull, build, and quickly test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tried it and everything looks great. Thanks a lot!

@trask trask merged commit 9b5e29d into open-telemetry:main Feb 1, 2024
47 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 2, 2024
…ion (#10350)

Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
steverao pushed a commit to steverao/opentelemetry-java-instrumentation that referenced this pull request Feb 16, 2024
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.

None yet

3 participants