Skip to content

[Redis] Add schema URL to traces#4095

Merged
martincostello merged 6 commits intoopen-telemetry:mainfrom
martincostello:gh-4064-redis
Apr 30, 2026
Merged

[Redis] Add schema URL to traces#4095
martincostello merged 6 commits intoopen-telemetry:mainfrom
martincostello:gh-4064-redis

Conversation

@martincostello
Copy link
Copy Markdown
Member

Contributes to #4064.

Changes

Add schema URL to the ActivitySource.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

Add schema URL to the `ActivitySource`.

Contributes to open-telemetry#4064.
@github-actions github-actions Bot added the comp:instrumentation.stackexchangeredis Things related to OpenTelemetry.Instrumentation.StackExchangeRedis label Apr 12, 2026
Comment thread src/OpenTelemetry.Instrumentation.StackExchangeRedis/CHANGELOG.md Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.86%. Comparing base (a545405) to head (38b09ab).
⚠️ Report is 74 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4095      +/-   ##
==========================================
+ Coverage   73.85%   73.86%   +0.01%     
==========================================
  Files         459      459              
  Lines       18327    18335       +8     
==========================================
+ Hits        13535    13543       +8     
  Misses       4792     4792              
Flag Coverage Δ
unittests-Instrumentation.StackExchangeRedis 93.78% <100.00%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...mentation/RedisProfilerEntryToActivityConverter.cs 93.00% <100.00%> (+0.30%) ⬆️
...dis/StackExchangeRedisConnectionInstrumentation.cs 95.94% <100.00%> (+0.11%) ⬆️
...ckExchangeRedis/TracerProviderBuilderExtensions.cs 88.88% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@martincostello martincostello marked this pull request as ready for review April 14, 2026 14:50
@martincostello martincostello requested a review from a team as a code owner April 14, 2026 14:50
Copilot AI review requested due to automatic review settings April 14, 2026 14:50
Copy link
Copy Markdown
Contributor

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

Note

Copilot was unable to run its full agentic suite in this review.

Adds OpenTelemetry schema URL (and instrumentation scope version) support to StackExchangeRedis traces by switching to an ActivitySourceFactory-created ActivitySource and updating tests/changelog accordingly.

Changes:

  • Create ActivitySource instances with schema URL support via shared ActivitySourceFactory.
  • Select between “old” and “new” semantic conventions by emitting activities from different ActivitySources.
  • Add/extend tests to assert ActivitySource name/version and schema URL; update changelog.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/OpenTelemetry.Instrumentation.StackExchangeRedis.Tests/StackExchangeRedisCallsInstrumentationTests.cs Adds assertions for scope name/version and schema URLs for emitted activities.
src/OpenTelemetry.Instrumentation.StackExchangeRedis/TracerProviderBuilderExtensions.cs Registers the ActivitySource name from the created ActivitySource instance.
src/OpenTelemetry.Instrumentation.StackExchangeRedis/StackExchangeRedisConnectionInstrumentation.cs Introduces schema-versioned ActivitySource instances via ActivitySourceFactory.
src/OpenTelemetry.Instrumentation.StackExchangeRedis/OpenTelemetry.Instrumentation.StackExchangeRedis.csproj Links shared ActivitySourceFactory.cs into the project.
src/OpenTelemetry.Instrumentation.StackExchangeRedis/Implementation/RedisProfilerEntryToActivityConverter.cs Chooses the appropriate ActivitySource based on EmitNewAttributes.
src/OpenTelemetry.Instrumentation.StackExchangeRedis/CHANGELOG.md Documents the addition of scope version and schema URL to traces.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Matthew Hensley <130569+matt-hensley@users.noreply.github.com>
If both conventions are enabled, do not emit a telemetry schema URL.
@martincostello martincostello added this pull request to the merge queue Apr 30, 2026
Merged via the queue into open-telemetry:main with commit 3a1bf24 Apr 30, 2026
73 checks passed
@martincostello martincostello deleted the gh-4064-redis branch April 30, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:instrumentation.stackexchangeredis Things related to OpenTelemetry.Instrumentation.StackExchangeRedis

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants