open-telemetry / opentelemetry-dotnet-contrib

This repository contains set of components extending functionality of the OpenTelemetry .NET SDK. Instrumentation libraries, exporters, and other components can find their home here.
https://opentelemetry.io
Apache License 2.0
421 stars 251 forks source link

[Instrumentation.StackExchangeRedis] Support when IConnectionMultiplexer is added with keyed service #1885

Open Kahbazi opened 1 week ago

Kahbazi commented 1 week ago

Fixes #1451.

Changes

Added a new overload to AddRedisInstrumentation which gets serviceKey in input and get IConnectionMultiplexer with a keyed service.

For significant contributions please make sure you have completed the following items:

Kielek commented 1 week ago

@eerhardt, please check this PR, you were reviewing the first version.

codecov[bot] commented 2 days ago

Codecov Report

Attention: Patch coverage is 50.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 69.92%. Comparing base (71655ce) to head (06c118f). Report is 340 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet-contrib/pull/1885/graphs/tree.svg?width=650&height=150&src=pr&token=DG2DEROH83&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet-contrib/pull/1885?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ```diff @@ Coverage Diff @@ ## main #1885 +/- ## ========================================== - Coverage 73.91% 69.92% -3.99% ========================================== Files 267 5 -262 Lines 9615 276 -9339 ========================================== - Hits 7107 193 -6914 + Misses 2508 83 -2425 ``` | [Flag](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet-contrib/pull/1885/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [unittests-Instrumentation.StackExchangeRedis](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet-contrib/pull/1885/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `69.92% <50.00%> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet-contrib/pull/1885?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [...ckExchangeRedis/TracerProviderBuilderExtensions.cs](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet-contrib/pull/1885?src=pr&el=tree&filepath=src%2FOpenTelemetry.Instrumentation.StackExchangeRedis%2FTracerProviderBuilderExtensions.cs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL09wZW5UZWxlbWV0cnkuSW5zdHJ1bWVudGF0aW9uLlN0YWNrRXhjaGFuZ2VSZWRpcy9UcmFjZXJQcm92aWRlckJ1aWxkZXJFeHRlbnNpb25zLmNz) | `83.33% <50.00%> (-8.16%)` | :arrow_down: | ... and [266 files with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-dotnet-contrib/pull/1885/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)