Skip to content

[receiver/sqlserver] Accept traceparent context info#39539

Merged
atoulme merged 8 commits into
open-telemetry:mainfrom
sincejune:sqlserver-accept-traceparent-context-info
Apr 24, 2025
Merged

[receiver/sqlserver] Accept traceparent context info#39539
atoulme merged 8 commits into
open-telemetry:mainfrom
sincejune:sqlserver-accept-traceparent-context-info

Conversation

@sincejune
Copy link
Copy Markdown
Contributor

Description

Accept context_info with traceparent format in query sample collection, setting log record with correct traceId and spanId.

Example use case: open-telemetry/opentelemetry-dotnet-contrib#2709

Link to tracking issue

n/a

Testing

Updated

Documentation

Added

@sincejune sincejune requested review from a team and crobert-1 as code owners April 22, 2025 13:36
@github-actions github-actions Bot added receiver/sqlserver Run Windows Enable running windows test on a PR labels Apr 22, 2025
@github-actions github-actions Bot requested a review from StefanKurek April 22, 2025 13:37
Copy link
Copy Markdown
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

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

Written by codeowner, approved and merging.

@atoulme atoulme merged commit 588b225 into open-telemetry:main Apr 24, 2025
@github-actions github-actions Bot added this to the next release milestone Apr 24, 2025
songy23 pushed a commit that referenced this pull request Dec 23, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This PR makes postgres receiver to parse `application_name` as trace
context when fetching query samples.

This is similar to what [sqlserver receiver's trace context
approach](#39539)
where it reads the value from `SET CONTEXT`. In this implementation, the
receiver reads the value from `SET application_name`.

<!--Describe what testing was performed and which tests were added.-->
#### Testing

It has a test `TestScrapeQuerySampleWithTraceparent` to verify the
result.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

receiver/sqlserver Run Windows Enable running windows test on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants