Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Resources.Container] Rename Container detector namespace #1849

Merged
merged 11 commits into from
Jun 4, 2024

Conversation

joegoldman2
Copy link
Contributor

@joegoldman2 joegoldman2 commented May 29, 2024

Fixes #1610.

Changes

  • Renames OpenTelemetry.ResourceDetectors.Container to OpenTelemetry.Resources.Container
  • Makes detector internal
  • Adds AddContainerDetector extension method for ResourceBuilder

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

  • Appropriate CHANGELOG.md updated for non-trivial changes
  • Design discussion issue #
  • Changes in public API reviewed

@joegoldman2 joegoldman2 requested a review from a team May 29, 2024 16:53
@github-actions github-actions bot requested a review from iskiselev May 29, 2024 16:53
@Kielek Kielek added the comp:resources.container Things related to OpenTelemetry.Resources.Container label May 29, 2024
Copy link

codecov bot commented May 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 70.68%. Comparing base (71655ce) to head (e87aa68).
Report is 282 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1849      +/-   ##
==========================================
- Coverage   73.91%   70.68%   -3.24%     
==========================================
  Files         267      297      +30     
  Lines        9615    11314    +1699     
==========================================
+ Hits         7107     7997     +890     
- Misses       2508     3317     +809     
Flag Coverage Δ
unittests-Exporter.Geneva 52.08% <ø> (?)
unittests-Exporter.InfluxDB 95.88% <ø> (?)
unittests-Exporter.Instana 68.22% <ø> (?)
unittests-Exporter.OneCollector 89.46% <ø> (?)
unittests-Exporter.Stackdriver 75.73% <ø> (?)
unittests-Extensions 79.33% <ø> (?)
unittests-Extensions.AWS 83.41% <ø> (?)
unittests-Extensions.Enrichment 100.00% <ø> (?)
unittests-Instrumentation.AWS 87.37% <ø> (?)
unittests-Instrumentation.AWSLambda 87.96% <ø> (?)
unittests-Instrumentation.AspNet 74.55% <ø> (?)
unittests-Instrumentation.AspNetCore 85.27% <ø> (?)
unittests-Instrumentation.ElasticsearchClient 79.87% <ø> (?)
unittests-Instrumentation.EntityFrameworkCore 55.49% <ø> (?)
unittests-Instrumentation.EventCounters 76.36% <ø> (?)
unittests-Instrumentation.GrpcNetClient 79.61% <ø> (?)
unittests-Instrumentation.Hangfire 93.58% <ø> (?)
unittests-Instrumentation.Http 81.79% <ø> (?)
unittests-Instrumentation.Owin 83.43% <ø> (?)
unittests-Instrumentation.Process 100.00% <ø> (?)
unittests-Instrumentation.Quartz 78.94% <ø> (?)
unittests-Instrumentation.Runtime 100.00% <ø> (?)
unittests-Instrumentation.SqlClient 91.89% <ø> (?)
unittests-Instrumentation.StackExchangeRedis 68.02% <ø> (?)
unittests-Instrumentation.Wcf 48.91% <ø> (?)
unittests-PersistentStorage 65.44% <ø> (?)
unittests-Resources.AWS 76.02% <ø> (?)
unittests-Resources.Azure 78.35% <ø> (?)
unittests-Resources.Container 72.41% <0.00%> (?)
unittests-Resources.Gcp 72.54% <ø> (?)
unittests-Resources.Host 47.67% <ø> (?)
unittests-Resources.Process 81.81% <ø> (?)
unittests-Resources.ProcessRuntime 82.35% <ø> (?)
unittests-Sampler.AWS 87.97% <ø> (?)

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

Files Coverage Δ
...ources.Container/ContainerExtensionsEventSource.cs 0.00% <ø> (ø)
...lemetry.Resources.Container/Utils/EncodingUtils.cs 100.00% <ø> (ø)
...Telemetry.Resources.Container/ContainerDetector.cs 82.60% <0.00%> (ø)
...es.Container/ContainerResourceBuilderExtensions.cs 0.00% <0.00%> (ø)

... and 308 files with indirect coverage changes

Copy link
Contributor

@Kielek Kielek left a comment

Choose a reason for hiding this comment

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

LGTM

@joegoldman2 joegoldman2 closed this Jun 3, 2024
@joegoldman2 joegoldman2 reopened this Jun 3, 2024
Copy link
Contributor

@iskiselev iskiselev 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 except minor missed rename. After we merge it, somebody would be required to mark as deprecated https://www.nuget.org/packages/OpenTelemetry.ResourceDetectors.Container pointing to a new name, and probably update recommended replacement in https://www.nuget.org/packages/OpenTelemetry.Extensions.Docker

uses: ./.github/workflows/Component.BuildTest.yml
with:
project-name: Component[OpenTelemetry.Resources.Container]
code-cov-name: ResourceDetectors.Container
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be renamed to Resources.Container?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch. Fixed in e87aa68 with couple other things

@Kielek
Copy link
Contributor

Kielek commented Jun 4, 2024

Looks good except minor missed rename. After we merge it, somebody would be required to mark as deprecated https://www.nuget.org/packages/OpenTelemetry.ResourceDetectors.Container pointing to a new name, and probably update recommended replacement in https://www.nuget.org/packages/OpenTelemetry.Extensions.Docker

I will handle nuget part, probably today, when all resource packages are released.

@Kielek Kielek merged commit 4107ce2 into open-telemetry:main Jun 4, 2024
264 checks passed
@joegoldman2 joegoldman2 deleted the rename-resources-container branch June 4, 2024 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:resources.container Things related to OpenTelemetry.Resources.Container
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reconsider ResourceDetectors namespaces and usages
4 participants