-
Notifications
You must be signed in to change notification settings - Fork 293
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.Gcp] Add Google Cloud Platform resource detector #1691
Conversation
# Conflicts: # opentelemetry-dotnet-contrib.sln
# Conflicts: # opentelemetry-dotnet-contrib.sln
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1691 +/- ##
==========================================
+ Coverage 73.91% 75.97% +2.05%
==========================================
Files 267 297 +30
Lines 9615 11557 +1942
==========================================
+ Hits 7107 8780 +1673
- Misses 2508 2777 +269 Flags with carried forward coverage won't be shown. Click here to find out more.
|
# Conflicts: # opentelemetry-dotnet-contrib.sln
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@CodeBlanch, could you please review public API?
# Conflicts: # .github/workflows/ci.yml # opentelemetry-dotnet-contrib.sln
src/OpenTelemetry.Resources.Gcp/.publicApi/net6.0/PublicAPI.Shipped.txt
Outdated
Show resolved
Hide resolved
using OpenTelemetry.Internal; | ||
using OpenTelemetry.Resources.Gcp; | ||
|
||
namespace OpenTelemetry.Resources; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should extensions go into the namespace of the thing they are extending or somewhere else?
We have had debates about this in the past so I thought I would drop a comment here to make it known this was an intentional decision.
.NET guidelines say this:
I would argue these packages/extensions are all about dependency management for users so this gets a 👍 from me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the instrumentations put their extension methods in the namespace for the type they're extending (ex. OpenTelemetry.Trace
, OpenTelemetry.Metrics
), so would fit unless the other extension methods are going to be moved.
The public API LGTM. This whole PR is very nicely done! I ❤️ using I haven't approved just yet because I asked @alanwest to also take a look. Because he was originally leading the charge for better package names (open-telemetry/opentelemetry-dotnet#3469). |
I don't mind if we change course on this, but is the plan to rename the existing packages to |
Yes. #1610 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Changes
Adds Google Cloud Platform resource detector. See package README for published resource attributes.
This package use the new namespace and extension method approach proposed in #1610.
A
AddGcpDetector
extension method is available forResourceBuilder
.CHANGELOG.md
updated for non-trivial changes