Draft
Conversation
…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>
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
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 to 1.58.0 and Instrumentation from 2.21.0 to 2.24.0. Version 2.24.0 introduced breaking internal API changes and a new
io.opentelemetry.commonpackage that caused classloader conflicts and initialization timing issues.Classloader Conflict Resolution
The new
io.opentelemetry.common.ComponentLoaderclass appears in both upstream javaagent (pre-shaded) and our transitive dependencies. Including both creates loader constraint violations:Fix: Exclude
io.opentelemetry:opentelemetry-commonfrom our javaagent libs since upstream already provides it. Also exclude already-shaded upstream classes from relocation to prevent double-shading.API Migrations
AgentInstrumentationConfig removed
Upstream removed this internal API. Instrumentation modules now load before SDK autoconfiguration, preventing access to properties through
DeclarativeConfigUtil. Switched to system property access with AiConfigCustomizer setting properties viaSystem.setProperty():LoggingCustomizer.init() signature changed
Now takes no parameters instead of
EarlyInitAgentConfig.GlobalOpenTelemetry.getPropagators() unreliable
Changed Azure Functions instrumentation to use
W3CTraceContextPropagator.getInstance()directly.Initialization Timing
Browser SDK snippet initialization triggered
GlobalOpenTelemetry.get()during SDK autoconfiguration, beforeGlobalOpenTelemetry.set()was called. Moved snippet initialization fromSecondEntryPoint.customize()toAfterAgentListener.afterAgent().Files Modified
dependencyManagement/build.gradle.kts- version bumpsagent/agent/build.gradle.kts- opentelemetry-common exclusionbuildSrc/.../ai.shadow-conventions.gradle.kts- relocation exclusions for shaded classesagent/agent-tooling/.../AiConfigCustomizer.java- system property settingagent/agent-tooling/.../FirstEntryPoint.java- LoggingCustomizer APIagent/agent-tooling/.../SecondEntryPoint.java- removed early snippet initagent/agent-tooling/.../AfterAgentListener.java- deferred snippet initagent/instrumentation/methods/.../MethodInstrumentationModule.java- system property configagent/instrumentation/micrometer-1.0/.../AzureMonitorRegistryConfig.java- system property configagent/instrumentation/azure-functions/.../InvocationInstrumentation.java- direct propagatorWarning
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:
agent.azureserviceprofiler.net/opt/java/openjdk/bin/java java -jar RuntimeAttachWithDelayedConnectionString-3.7.7-SNAPSHOT.jar delete(dns block)/opt/java/openjdk/bin/java java -jar RuntimeAttachWithDelayedConnectionString-3.7.7-SNAPSHOT.jar(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.