-
Notifications
You must be signed in to change notification settings - Fork 38
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 OTLP trace with ADC example #297
Conversation
Is this different from this example which is already present ? It seems similar. |
Ah, nvm it uses OTLP Span exporter instead of Google Cloud Exporter. |
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 sample looks good. A couple of follow-ups:
- Should we move it to the existing
examples
folder ? The proposed example is placed in a folder calledexample
. - Could we add a corresponding gradle file along with a small Readme with instructions to build and run this example so that it remains consistent with the rest of the examples.
71609a4
to
9bd81b1
Compare
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.
Looks good to me! Thanks @damemi ! 👍🏻
Following from our offline discussion, two pending action items prior to merging -
- Adding
-Dotel.exporter.otlp.protocol=http/protobuf'
to theautoconf_config
inbuild.gradle
- Adding a README file under
examples/otlptrace
to give an overview of this example and instructions on running it.
Thanks for all your help @psx95! I added the changes we talked about and tested this and it's working now 🎉 |
...lptrace/src/main/java/com/google/cloud/opentelemetry/example/otlptrace/OTLPTraceExample.java
Outdated
Show resolved
Hide resolved
...lptrace/src/main/java/com/google/cloud/opentelemetry/example/otlptrace/OTLPTraceExample.java
Outdated
Show resolved
Hide resolved
…erations-java into otpl-auth-sample
…rces-support to v0.28.0 (#2649) [![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.27.0` -> `0.28.0` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.cloud.opentelemetry:detector-resources-support/0.28.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.28.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.27.0/0.28.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.27.0/0.28.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.28.0`](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/releases/tag/v0.28.0) [Compare Source](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/compare/v0.27.0...v0.28.0) #### Release Highlights - Add support for `CreateServiceTimeseries` in metrics exporter in [#​318](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/issues/318). - Add resource attributes as metrics labels by providing a Predicate based filter to control which resource attributes end up as metric labels in [#​314](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/issues/314), [#​319](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/issues/319). #### What's Changed - Add Readme for detector-resources-support module by [@​psx95](https://togithub.com/psx95) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/282](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/282) - Copy instrumentation quickstart out of java-docs-samples by [@​aabmass](https://togithub.com/aabmass) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/283](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/283) - Enable snippet-bot by [@​aabmass](https://togithub.com/aabmass) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/284](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/284) - Quota project fix by [@​aabmass](https://togithub.com/aabmass) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/286](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/286) - Use logstash-logback-encoder version that works with spring boot 2 by [@​aabmass](https://togithub.com/aabmass) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/285](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/285) - Update instrumentation quickstart README links by [@​aabmass](https://togithub.com/aabmass) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/287](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/287) - Make examples/instrumentation-quickstart a standalone gradle build by [@​aabmass](https://togithub.com/aabmass) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/289](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/289) - Add CI for examples/instrumentation-quickstart by [@​aabmass](https://togithub.com/aabmass) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/290](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/290) - Test against java 11 by [@​aabmass](https://togithub.com/aabmass) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/293](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/293) - Update TraceTranslator.java by [@​WadeGulbrandsen](https://togithub.com/WadeGulbrandsen) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/296](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/296) - feat: simplify logging in instrumentation quickstart by [@​dashpole](https://togithub.com/dashpole) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/298](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/298) - Update Gradle to v8.6 by [@​psx95](https://togithub.com/psx95) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/300](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/300) - Replace resource detector with upstream detector by [@​psx95](https://togithub.com/psx95) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/301](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/301) - Update links to the upstream detector by [@​psx95](https://togithub.com/psx95) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/302](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/302) - Add OTLP trace with ADC example by [@​damemi](https://togithub.com/damemi) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/297](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/297) - Update auto-exporter readme by [@​psx95](https://togithub.com/psx95) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/304](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/304) - Add tests to verify OTel integration using in-memory exporter by [@​psx95](https://togithub.com/psx95) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/306](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/306) - Add GH action step to test shadowJar by [@​psx95](https://togithub.com/psx95) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/309](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/309) - Add missing GOOGLE_CLOUD_QUOTA_PROJECT environment variable to compose file by [@​aabmass](https://togithub.com/aabmass) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/311](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/311) - Update instrumentation quickstart to new region tag name by [@​aabmass](https://togithub.com/aabmass) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/312](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/312) - Update instrumentation-quickstart README by [@​psx95](https://togithub.com/psx95) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/315](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/315) - Add resource attributes as metric labels by [@​psx95](https://togithub.com/psx95) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/314](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/314) - Update resource detection sample by [@​psx95](https://togithub.com/psx95) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/317](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/317) - Make setResourceAttributesFilter public by [@​psx95](https://togithub.com/psx95) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/319](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/319) - Add support for createServiceTimeSeries by [@​psx95](https://togithub.com/psx95) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/318](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/318) - Disable release for gcp-resource-detector by [@​psx95](https://togithub.com/psx95) in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/321](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/321) #### New Contributors - [@​WadeGulbrandsen](https://togithub.com/WadeGulbrandsen) made their first contribution in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/296](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/296) - [@​damemi](https://togithub.com/damemi) made their first contribution in [https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/297](https://togithub.com/GoogleCloudPlatform/opentelemetry-operations-java/pull/297) **Full Changelog**: GoogleCloudPlatform/opentelemetry-operations-java@v0.27.0...v0.28.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 has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/sdk-platform-java). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMDEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjMwMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Cobbled this together following docs from:
Same idea as GoogleCloudPlatform/opentelemetry-operations-go#800, GoogleCloudPlatform/opentelemetry-operations-python#307, and GoogleCloudPlatform/opentelemetry-operations-js#676