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

detectors/gcp: Add support for Cloud Run jobs #5559

Merged
merged 3 commits into from
May 17, 2024
Merged

detectors/gcp: Add support for Cloud Run jobs #5559

merged 3 commits into from
May 17, 2024

Conversation

nvx
Copy link
Contributor

@nvx nvx commented May 10, 2024

Adds support for Cloud Run jobs, previously on Cloud Run services were supported.

I've left the cloud platform as semconv.CloudPlatformGCPCloudRun as it's a part of Cloud Run ecosystem, but have no objections to making a "gcp_cloud_run_jobs" if needed although that would require an update to the semconv package first and I'm not quite sure I understand how the folder versioning works for that so would be looking for guidance (do I just add it to the latest version folder? do I make a new version copying the latest version folder?)

@nvx nvx requested a review from dashpole as a code owner May 10, 2024 01:13
@nvx nvx requested a review from a team May 10, 2024 01:13
Copy link

linux-foundation-easycla bot commented May 10, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

CHANGELOG.md Outdated Show resolved Hide resolved
@MrAlias
Copy link
Contributor

MrAlias commented May 10, 2024

cc @dashpole

Copy link

codecov bot commented May 10, 2024

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 62.8%. Comparing base (a7bcce4) to head (752dfb5).

Current head 752dfb5 differs from pull request most recent head 0a84407

Please upload reports for the commit 0a84407 to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #5559     +/-   ##
=======================================
- Coverage   63.2%   62.8%   -0.4%     
=======================================
  Files        194     192      -2     
  Lines      11958   11801    -157     
=======================================
- Hits        7558    7412    -146     
+ Misses      4183    4172     -11     
  Partials     217     217             
Files Coverage Δ
detectors/gcp/detector.go 86.8% <86.6%> (-0.1%) ⬇️

... and 4 files with indirect coverage changes

@MrAlias
Copy link
Contributor

MrAlias commented May 12, 2024

@nvx it looks like you pushed a commit with signature for that did not sign the CLA. Please be sure to sign for this alternate or re-sign the commit with the appropriate CLA. We are not able to accept this without doing so.

@nvx
Copy link
Contributor Author

nvx commented May 12, 2024

@nvx it looks like you pushed a commit with signature for that did not sign the CLA. Please be sure to sign for this alternate or re-sign the commit with the appropriate CLA. We are not able to accept this without doing so.

Looks like the changelog update suggestion made a commit with a different email, and then even rebasing and squashing back to the original didn't make it happy so had to resign it again. Looks like it's happy now though!

@nvx
Copy link
Contributor Author

nvx commented May 16, 2024

I added that test @dashpole, was there anything else needed before this can be merged?

Copy link
Contributor

@dashpole dashpole left a comment

Choose a reason for hiding this comment

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

Thanks!

@MrAlias MrAlias merged commit 0812bb2 into open-telemetry:main May 17, 2024
21 checks passed
zailic pushed a commit to zailic/opentelemetry-go-contrib that referenced this pull request May 20, 2024
Adds support for Cloud Run jobs, previously on Cloud Run services were
supported.

I've left the cloud platform as `semconv.CloudPlatformGCPCloudRun` as
it's a part of Cloud Run ecosystem, but have no objections to making a
"gcp_cloud_run_jobs" if needed although that would require an update to
the `semconv` package first and I'm not quite sure I understand how the
folder versioning works for that so would be looking for guidance (do I
just add it to the latest version folder? do I make a new version
copying the latest version folder?)

---------

Co-authored-by: David Ashpole <dashpole@google.com>
MrAlias added a commit that referenced this pull request May 21, 2024
### Added

- Add the new `go.opentelemetry.io/contrib/instrgen` package to provide
auto-generated source code instrumentation. (#3068, #3108)
- Add an experimental `OTEL_METRICS_PRODUCERS` environment variable to
`go.opentelemetry.io/contrib/autoexport` to be set metrics producers.
(#5281)
- `prometheus` and `none` are supported values. You can specify multiple
producers separated by a comma.
- Add `WithFallbackMetricProducer` option that adds a fallback if the
`OTEL_METRICS_PRODUCERS` is not set or empty.
- The `go.opentelemetry.io/contrib/processors/baggage/baggagetrace`
module. This module provides a Baggage Span Processor. (#5404)
- Add gRPC trace `Filter` for stats handler to
`go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`.
(#5196)
- Add a repository Code Ownership Policy. (#5555)
- The `go.opentelemetry.io/contrib/bridges/otellogrus` module. This
module provides an OpenTelemetry logging bridge for
`github.com/sirupsen/logrus`. (#5355)
- The `WithVersion` option function in
`go.opentelemetry.io/contrib/bridges/otelslog`. This option function is
used as a replacement of `WithInstrumentationScope` to specify the
logged package version. (#5588)
- The `WithSchemaURL` option function in
`go.opentelemetry.io/contrib/bridges/otelslog`. This option function is
used as a replacement of `WithInstrumentationScope` to specify the
semantic convention schema URL for the logged records. (#5588)
- Add support for Cloud Run jobs in
`go.opentelemetry.io/contrib/detectors/gcp`. (#5559)

### Changed

- The gRPC trace `Filter` for interceptor is renamed to
`InterceptorFilter`. (#5196)
- The gRPC trace filter functions `Any`, `All`, `None`, `Not`,
`MethodName`, `MethodPrefix`, `FullMethodName`, `ServiceName`,
`ServicePrefix` and `HealthCheck` for interceptor are moved to
`go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/filters/interceptor`.
With this change, the filters in
`go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`
are now working for stats handler. (#5196)

- `NewLogger` now accepts a `name` `string` as the first argument. This
parameter is used as a replacement of `WithInstrumentationScope` to
specify the name of the logger backing the underlying `Handler`. (#5588)
- `NewHandler` now accepts a `name` `string` as the first argument. This
parameter is used as a replacement of `WithInstrumentationScope` to
specify the name of the logger backing the returned `Handler`. (#5588)
- Upgrade all dependencies of `go.opentelemetry.io/otel/semconv/v1.24.0`
to `go.opentelemetry.io/otel/semconv/v1.25.0`. (#5605)

### Removed

- The `WithInstrumentationScope` option function in
`go.opentelemetry.io/contrib/bridges/otelslog` is removed. Use the
`name` parameter added to `NewHandler` and `NewLogger` as well as
`WithVersion` and `WithSchema` as replacements. (#5588)

### Deprecated

- The `InterceptorFilter` type in
`go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`
is deprecated. (#5196)
khushijain21 pushed a commit to khushijain21/opentelemetry-go-contrib that referenced this pull request May 22, 2024
### Added

- Add the new `go.opentelemetry.io/contrib/instrgen` package to provide
auto-generated source code instrumentation. (open-telemetry#3068, open-telemetry#3108)
- Add an experimental `OTEL_METRICS_PRODUCERS` environment variable to
`go.opentelemetry.io/contrib/autoexport` to be set metrics producers.
(open-telemetry#5281)
- `prometheus` and `none` are supported values. You can specify multiple
producers separated by a comma.
- Add `WithFallbackMetricProducer` option that adds a fallback if the
`OTEL_METRICS_PRODUCERS` is not set or empty.
- The `go.opentelemetry.io/contrib/processors/baggage/baggagetrace`
module. This module provides a Baggage Span Processor. (open-telemetry#5404)
- Add gRPC trace `Filter` for stats handler to
`go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`.
(open-telemetry#5196)
- Add a repository Code Ownership Policy. (open-telemetry#5555)
- The `go.opentelemetry.io/contrib/bridges/otellogrus` module. This
module provides an OpenTelemetry logging bridge for
`github.com/sirupsen/logrus`. (open-telemetry#5355)
- The `WithVersion` option function in
`go.opentelemetry.io/contrib/bridges/otelslog`. This option function is
used as a replacement of `WithInstrumentationScope` to specify the
logged package version. (open-telemetry#5588)
- The `WithSchemaURL` option function in
`go.opentelemetry.io/contrib/bridges/otelslog`. This option function is
used as a replacement of `WithInstrumentationScope` to specify the
semantic convention schema URL for the logged records. (open-telemetry#5588)
- Add support for Cloud Run jobs in
`go.opentelemetry.io/contrib/detectors/gcp`. (open-telemetry#5559)

### Changed

- The gRPC trace `Filter` for interceptor is renamed to
`InterceptorFilter`. (open-telemetry#5196)
- The gRPC trace filter functions `Any`, `All`, `None`, `Not`,
`MethodName`, `MethodPrefix`, `FullMethodName`, `ServiceName`,
`ServicePrefix` and `HealthCheck` for interceptor are moved to
`go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/filters/interceptor`.
With this change, the filters in
`go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`
are now working for stats handler. (open-telemetry#5196)

- `NewLogger` now accepts a `name` `string` as the first argument. This
parameter is used as a replacement of `WithInstrumentationScope` to
specify the name of the logger backing the underlying `Handler`. (open-telemetry#5588)
- `NewHandler` now accepts a `name` `string` as the first argument. This
parameter is used as a replacement of `WithInstrumentationScope` to
specify the name of the logger backing the returned `Handler`. (open-telemetry#5588)
- Upgrade all dependencies of `go.opentelemetry.io/otel/semconv/v1.24.0`
to `go.opentelemetry.io/otel/semconv/v1.25.0`. (open-telemetry#5605)

### Removed

- The `WithInstrumentationScope` option function in
`go.opentelemetry.io/contrib/bridges/otelslog` is removed. Use the
`name` parameter added to `NewHandler` and `NewLogger` as well as
`WithVersion` and `WithSchema` as replacements. (open-telemetry#5588)

### Deprecated

- The `InterceptorFilter` type in
`go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`
is deprecated. (open-telemetry#5196)
@pellared pellared added this to the untracked milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants