Skip to content

Add trace propagation for postgres#44868

Merged
songy23 merged 13 commits intoopen-telemetry:mainfrom
XSAM:add-trace-propagation-for-postgres
Dec 23, 2025
Merged

Add trace propagation for postgres#44868
songy23 merged 13 commits intoopen-telemetry:mainfrom
XSAM:add-trace-propagation-for-postgres

Conversation

@XSAM
Copy link
Member

@XSAM XSAM commented Dec 10, 2025

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 where it reads the value from SET CONTEXT. In this implementation, the receiver reads the value from SET application_name.

Testing

It has a test TestScrapeQuerySampleWithTraceparent to verify the result.

Copy link
Member

@crobert-1 crobert-1 left a comment

Choose a reason for hiding this comment

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

Mostly just questions out of ignorance, I left some style nits but if it's too much or not relevant I'm happy to discuss.

@XSAM XSAM requested a review from crobert-1 December 18, 2025 21:47
Copy link
Member

@crobert-1 crobert-1 left a comment

Choose a reason for hiding this comment

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

Looks good functionally, once CI/CD formatting and linting is green it should be good. Thanks @XSAM!

@atoulme
Copy link
Contributor

atoulme commented Dec 19, 2025

@antonblock @ishleenk17 @Caleb-Hurshman please review as codeowners.

Copy link
Contributor

@Caleb-Hurshman Caleb-Hurshman left a comment

Choose a reason for hiding this comment

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

Approved ✅

@sv-splunk
Copy link
Contributor

@antonblock @ishleenk17 @Caleb-Hurshman Could you please merge this also? Thanks

@songy23 songy23 merged commit 8bd91ee into open-telemetry:main Dec 23, 2025
189 checks passed
@github-actions github-actions bot added this to the next release milestone Dec 23, 2025
@XSAM XSAM deleted the add-trace-propagation-for-postgres branch December 23, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants