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

Add config option to disable attaching InstrumentationLibrary labels #358

Merged
merged 3 commits into from
Jul 10, 2024

Conversation

psx95
Copy link
Contributor

@psx95 psx95 commented Jul 9, 2024

Description

This PR adds a config option - setInstrumentationLibraryLabelsEnabled(boolean) that allows the user to configure the exporter to not attach the instrumentation library labels as metric attributes during export.

By default these labels are attached automatically by the exporter during export time.

Test

  • Added unit tests to verify the behavior.
  • Tested the config option through the metrics example.

fixes #357

@psx95 psx95 marked this pull request as ready for review July 9, 2024 22:48
@psx95 psx95 requested a review from a team as a code owner July 9, 2024 22:48
@psx95 psx95 requested review from aabmass and dashpole July 9, 2024 22:49
…/metric/MetricConfiguration.java


Fix typo

Co-authored-by: David Ashpole <dashpole@google.com>
@psx95 psx95 merged commit cfbc409 into GoogleCloudPlatform:main Jul 10, 2024
18 checks passed
@psx95 psx95 deleted the issue-357 branch July 10, 2024 14:56
lqiu96 referenced this pull request in googleapis/sdk-platform-java Jul 23, 2024
…rces-support to v0.31.0 (#3044)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[com.google.cloud.opentelemetry:detector-resources-support](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java)
| `0.30.0` -> `0.31.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.cloud.opentelemetry:detector-resources-support/0.31.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.31.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.30.0/0.31.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.30.0/0.31.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.31.0`](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/releases/tag/v0.31.0)

[Compare
Source](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/compare/v0.30.0...v0.31.0)

#### Release Highlights

- Adds exporter configuration option to disable attaching
instrumentation library labels.
- Adds exporter configuration option to provide `MetricServiceSettings`
object to configure the underlying service client used to interact with
Cloud Monitoring API.

#### What's Changed

- Update instructions to reflect recent auth changes by
[@&#8203;psx95](https://togithub.com/psx95) in
[https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/354](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/354)
- Remove unused OpenCensus dependency by
[@&#8203;psx95](https://togithub.com/psx95) in
[https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/355](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/355)
- Expose option to provide MetricServiceSettings in MetricConfiguration
by [@&#8203;psx95](https://togithub.com/psx95) in
[https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/356](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/356)
- Add config option to disable attaching InstrumentationLibrary labels
by [@&#8203;psx95](https://togithub.com/psx95) in
[https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/358](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/358)

**Full Changelog**:
GoogleCloudPlatform/opentelemetry-operations-java@v0.30.0...v0.31.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 this update
again.

---

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

---

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

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
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.

Add config to skip attaching InstrumentationScopeInfo as labels
2 participants