Skip to content

Conversation

@edigaryev
Copy link
Contributor

agentAwareTask.Traceparent and agentAwareTask.Tracestate can be empty, which will result in agent not configuring it's trace context.

By using Inject() and reading results from the mapCarrier, we always get some kind of trace context.

@edigaryev edigaryev requested a review from fkorotkov as a code owner April 23, 2025 20:00
@edigaryev edigaryev requested a review from Copilot April 23, 2025 20:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request addresses context propagation issues by ensuring that the agent always receives a valid W3C trace context, even when agentAwareTask.Traceparent and Tracestate are empty. Key changes include:

  • Removing traceparent and tracestate parameters from runTask.
  • Injecting a trace context into a MapCarrier using propagation.TraceContext{}.Inject.
  • Updating the environment configuration to obtain trace values directly from the MapCarrier.

@edigaryev edigaryev merged commit 6370916 into main Apr 24, 2025
10 of 11 checks passed
@edigaryev edigaryev deleted the propagate-properly branch April 24, 2025 11:11
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.

3 participants