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

Support cloud run jobs in resource detection #371

Merged
merged 4 commits into from
Sep 20, 2024

Conversation

psx95
Copy link
Contributor

@psx95 psx95 commented Sep 18, 2024

Description

Adds support for detecting Cloud Run Jobs environment.

Testing

  • Added unit tests pass + Build work.
  • Tested with manually built resource-detection library.
    • Debug exporter export output.
      INFO: metric: ImmutableMetricData{resource=Resource{schemaUrl=null, attributes={cloud.account.id="otel-test", cloud.platform="gcp_cloud_run", cloud.provider="gcp", cloud.region="us-central1", faas.instance="003fb3e0c8b947e4481e1e7e76dc3c594af483befe470a0bbb6fff27f96fa9caa77e6e202dcea43a646942", faas.name="job-metrics-export", gcp.cloud_run.job.execution="job-metrics-export-sprng", gcp.cloud_run.job.task_index=0}}, instrumentationScopeInfo=InstrumentationScopeInfo{name=instrumentation-library-name, version=semver:1.0.0, schemaUrl=null, attributes={}}, name=example_counter, description=Processed jobs, unit=1, type=LONG_SUM, data=ImmutableSumData{points=[ImmutableLongPointData{startEpochNanos=1726685490477889000, epochNanos=1726685512168409000, attributes={}, value=968, exemplars=[]}], monotonic=true, aggregationTemporality=CUMULATIVE}}

Re #369

@psx95 psx95 marked this pull request as ready for review September 18, 2024 19:30
@psx95 psx95 requested a review from a team as a code owner September 18, 2024 19:30
@psx95 psx95 changed the title Fix resource detection Support Cloud Run Jobs in resource detection Sep 18, 2024
@psx95 psx95 changed the title Support Cloud Run Jobs in resource detection Support cloud run jobs in resource detection Sep 18, 2024
@psx95 psx95 merged commit aa201df into GoogleCloudPlatform:main Sep 20, 2024
18 checks passed
@psx95 psx95 deleted the fix-resource-detection branch September 20, 2024 21:44
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.

2 participants