-
Notifications
You must be signed in to change notification settings - Fork 210
Upgrade OpenTelemetry to 1.58.0 / 2.24.0 #4606
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
Draft
Copilot
wants to merge
15
commits into
main
Choose a base branch
from
copilot/update-opentelemetry-versions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+95
−35
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rors) Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update OpenTelemetry SDK and instrumentation versions
Upgrade OpenTelemetry to 1.58.0 / 2.24.0
Jan 28, 2026
Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
Copilot
AI
changed the title
Upgrade OpenTelemetry to 1.58.0 / 2.24.0
Add system property fallback to DeclarativeConfigUtil config access
Jan 28, 2026
Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
After OpenTelemetry upgrade to 2.24.0, GlobalOpenTelemetry.getPropagators() doesn't work correctly in test environments. Changed to use W3CTraceContextPropagator.getInstance() directly for context extraction. Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
Copilot
AI
changed the title
Add system property fallback to DeclarativeConfigUtil config access
Fix Azure Functions context propagation after OpenTelemetry 2.24.0 upgrade
Feb 4, 2026
Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
The upstream OpenTelemetry javaagent already includes io.opentelemetry.common classes (properly shaded). Our build was including the same classes, causing classloader conflicts. Added exclusion to prevent double inclusion. Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
Copilot
AI
changed the title
Fix Azure Functions context propagation after OpenTelemetry 2.24.0 upgrade
Upgrade OpenTelemetry to 1.58.0 / 2.24.0
Feb 5, 2026
AiConfigCustomizer properties need to be accessible by instrumentation modules that load early. Setting them as system properties ensures they're available through the System.getProperty() fallback mechanism. Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
Co-authored-by: xiang17 <9310587+xiang17@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Upgrades OpenTelemetry SDK from 1.55.0 → 1.58.0 and Instrumentation from 2.21.0 → 2.24.0. The upgrade introduced breaking internal APIs and a new
io.opentelemetry.commonpackage causing classloader conflicts.Classloader conflict
io.opentelemetry.common.ComponentLoaderappears in both upstream javaagent (pre-shaded) and our transitive dependencies, creating loader constraint violations across bootstrap and agent classloaders.Fix: Exclude from our javaagent libs + prevent double-relocation of upstream's already-shaded classes:
API migrations
AgentInstrumentationConfigremoved - Instrumentation modules now load before SDK autoconfiguration. Migrated to system property access withAiConfigCustomizersetting viaSystem.setProperty()for early access.LoggingCustomizer.init(EarlyInitAgentConfig)→init()GlobalOpenTelemetry.getPropagators()- Unreliable in 2.24.0 instrumentation contexts. Azure Functions now usesW3CTraceContextPropagator.getInstance()directly.Initialization timing
Browser SDK snippet initialization triggered
GlobalOpenTelemetry.get()during autoconfiguration, beforeset()was called. Moved fromSecondEntryPoint.customize()toAfterAgentListener.afterAgent().SDK internal metrics
2.24.0 exports new SDK telemetry (
otel.sdk.span.live,otel.sdk.span.started,otel.sdk.log.created). Added views to drop these internal metrics:Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
checkstyle.org/opt/hostedtoolcache/CodeQL/2.24.0/x64/codeql/tools/linux64/java/bin/java /opt/hostedtoolcache/CodeQL/2.24.0/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.24.0/x64/codeql/xml/tools/xml-extractor.jar --fileList=/home/REDACTED/work/ApplicationInsights-Java/.codeql-scratch/dbs/java/working/files-to-index1302151850725525431.list --sourceArchiveDir=/home/REDACTED/work/ApplicationInsights-Java/.codeql-scratch/dbs/java/src --outputDir=/home/REDACTED/work/ApplicationInsights-Java/.codeql-scratch/dbs/java/trap/java -j MASQUERADE cf7b13a00fb2cb59/usr/sbin/iptables(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.