Skip to content

feat(tedious): context propagation to SQL Server#3141

Merged
trentm merged 11 commits intoopen-telemetry:mainfrom
mhennoch:sql-context
Nov 5, 2025
Merged

feat(tedious): context propagation to SQL Server#3141
trentm merged 11 commits intoopen-telemetry:mainfrom
mhennoch:sql-context

Conversation

@mhennoch
Copy link
Copy Markdown
Contributor

@mhennoch mhennoch commented Oct 3, 2025

Calls set context_info before methods that actually execute user's SQL(omitting prepare and execBulkLoad). Relevant specification. This is opt in as it causes an extra round trip per request. .NET PR for the same thing

@mhennoch mhennoch requested a review from a team as a code owner October 3, 2025 14:17
@github-actions github-actions Bot added pkg:instrumentation-tedious pkg-status:unmaintained This package is unmaintained. Only bugfixes may be acceped until a new owner has been found. labels Oct 3, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 4, 2025

This package does not have an assigned component owner and is considered unmaintained. As such this package is in feature-freeze and this PR will be closed with 14 days unless a new owner or a sponsor (a member of @open-telemetry/javascript-approvers) for the feature is found. It is the responsibility of the author to find a sponsor for this feature.
Are you familiar with this package? Consider becoming a component owner.

@trentm trentm added the has:sponsor This package or feature has a sponsor that has volunteered to review PRs and respond to questions label Oct 8, 2025
cfg.enableTraceContextPropagation &&
thisPlugin._shouldInjectFor(operation);

if (!shouldInject) return runUserRequest();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The previous code and this code path will return the return value of the originalMethod() call, which is typically what is wanted when wrapping. The _injectContextInfo() code path below this will not. I gather that won't matter for this instrumentation because, at least currently, every patched method's return type is void.

Comment thread packages/instrumentation-tedious/src/instrumentation.ts Outdated
Comment thread packages/instrumentation-tedious/src/instrumentation.ts Outdated
Comment thread packages/instrumentation-tedious/src/instrumentation.ts Outdated
Comment thread packages/instrumentation-tedious/src/instrumentation.ts
@trentm trentm enabled auto-merge (squash) November 5, 2025 18:06
@trentm trentm merged commit 51ccb3c into open-telemetry:main Nov 5, 2025
20 checks passed
@otelbot-js-contrib otelbot-js-contrib Bot mentioned this pull request Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has:sponsor This package or feature has a sponsor that has volunteered to review PRs and respond to questions pkg:instrumentation-tedious pkg-status:unmaintained This package is unmaintained. Only bugfixes may be acceped until a new owner has been found.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants