-
Notifications
You must be signed in to change notification settings - Fork 591
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
Added google cloud function resource detector #1584
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1584 +/- ##
=======================================
+ Coverage 70.3% 70.5% +0.1%
=======================================
Files 128 129 +1
Lines 5537 5564 +27
=======================================
+ Hits 3898 3925 +27
Misses 1500 1500
Partials 139 139
|
return nil,nil when not on cloud-function
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.
Can you add unit tests? They should be very similar to the cloud run unit tests: https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/detectors/gcp/cloud-run_test.go#L82
Okay, will add unit test cases. |
Hi @dashpole , |
Hi @dashpole , |
Hi @Aneurysm9 |
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.
Please add a CHANGELOG.md
entry for this addition.
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.
The initialization of the CloudFunction
type needs to be addressed before we can merge this.
@patil-kshitij are you still able to work on this and apply the feedback? |
Sure, @MrAlias , will work on the feedback and apply those changes |
Hi @Aneurysm9 , have added changelog, can you please review ? |
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, a little suggestion!
@@ -13,6 +13,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm | |||
|
|||
- DynamoDB spans created with the `go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws` package will now have the appropriate database attributes added for the operation being performed. | |||
These attributes are detected automatically, but it is also now possible to provide a custom function to set attributes using `WithAttributeSetter`. (#1582) | |||
- Add resource detector for GCP cloud function. |
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.
- Add resource detector for GCP cloud function. | |
- Add resource detector for GCP cloud function. (#1584) |
gcpFunctionNameKey = "K_SERVICE" | ||
) | ||
|
||
// NewCloudFunction will return a GCP Cloud Function resource detector. |
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.
// NewCloudFunction will return a GCP Cloud Function resource detector. | |
// NewCloudFunction returns a GCP Cloud Function resource detector. |
Added google cloud-function resource detector
Added following attributes -