Skip to content

Support cloud run jobs in resource detection#371

Merged
psx95 merged 4 commits intoGoogleCloudPlatform:mainfrom
psx95:fix-resource-detection
Sep 20, 2024
Merged

Support cloud run jobs in resource detection#371
psx95 merged 4 commits intoGoogleCloudPlatform:mainfrom
psx95:fix-resource-detection

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 requested review from aabmass and dashpole September 18, 2024 19:31
@psx95 psx95 merged commit aa201df into GoogleCloudPlatform:main Sep 20, 2024
@psx95 psx95 deleted the fix-resource-detection branch September 20, 2024 21:44
lqiu96 referenced this pull request in googleapis/sdk-platform-java Sep 25, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[com.google.cloud.opentelemetry:detector-resources-support](https://redirect.github.com/GoogleCloudPlatform/opentelemetry-operations-java)
| `0.31.0` -> `0.32.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.cloud.opentelemetry:detector-resources-support/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.google.cloud.opentelemetry:detector-resources-support/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.google.cloud.opentelemetry:detector-resources-support/0.31.0/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.google.cloud.opentelemetry:detector-resources-support/0.31.0/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[com.google.cloud.opentelemetry:shared-resourcemapping](https://redirect.github.com/GoogleCloudPlatform/opentelemetry-operations-java)
| `0.31.0` -> `0.32.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.cloud.opentelemetry:shared-resourcemapping/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.google.cloud.opentelemetry:shared-resourcemapping/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.google.cloud.opentelemetry:shared-resourcemapping/0.31.0/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.google.cloud.opentelemetry:shared-resourcemapping/0.31.0/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[com.google.cloud.opentelemetry:exporter-metrics](https://redirect.github.com/GoogleCloudPlatform/opentelemetry-operations-java)
| `0.31.0` -> `0.32.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.cloud.opentelemetry:exporter-metrics/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.google.cloud.opentelemetry:exporter-metrics/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.google.cloud.opentelemetry:exporter-metrics/0.31.0/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.google.cloud.opentelemetry:exporter-metrics/0.31.0/0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>GoogleCloudPlatform/opentelemetry-operations-java
(com.google.cloud.opentelemetry:detector-resources-support)</summary>

###
[`v0.32.0`](https://redirect.github.com/GoogleCloudPlatform/opentelemetry-operations-java/releases/tag/v0.32.0)

[Compare
Source](https://redirect.github.com/GoogleCloudPlatform/opentelemetry-operations-java/compare/v0.31.0...v0.32.0)

##### Release Highlights

- Enables detection of Cloud Run Jobs environment in GCP resource
detector.

##### What's Changed

- Delete unused logback xml from instrumentation quickstart by
[@&#8203;aabmass](https://redirect.github.com/aabmass) in
[https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/333](https://redirect.github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/333)
- Upgrade to latest nebula-release plugin to fix build by
[@&#8203;aabmass](https://redirect.github.com/aabmass) in
[https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/362](https://redirect.github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/362)
- Migrate e2e tests Container Registry usage to Artifact Registry by
[@&#8203;aabmass](https://redirect.github.com/aabmass) in
[https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/360](https://redirect.github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/360)
- Update the collector image used in instrumentation quickstart by
[@&#8203;aabmass](https://redirect.github.com/aabmass) in
[https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/364](https://redirect.github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/364)
- Rename spring example by
[@&#8203;psx95](https://redirect.github.com/psx95) in
[https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/367](https://redirect.github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/367)
- Add manually instrumented spring sample by
[@&#8203;psx95](https://redirect.github.com/psx95) in
[https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/368](https://redirect.github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/368)
- Update metrics example by
[@&#8203;psx95](https://redirect.github.com/psx95) in
[https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/370](https://redirect.github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/370)
- Fix the sample code shown in README by
[@&#8203;psx95](https://redirect.github.com/psx95) in
[https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/373](https://redirect.github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/373)
- Support cloud run jobs in resource detection by
[@&#8203;psx95](https://redirect.github.com/psx95) in
[https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/371](https://redirect.github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/371)
- Remove obsolete TODO comment by
[@&#8203;psx95](https://redirect.github.com/psx95) in
[https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/374](https://redirect.github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/374)

**Full Changelog**:
GoogleCloudPlatform/opentelemetry-operations-java@v0.31.0...v0.32.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/googleapis/sdk-platform-java).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
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