opentelemetry-java | OpenTelemetry Java SDK | REST library
kandi X-RAY | opentelemetry-java Summary
kandi X-RAY | opentelemetry-java Summary
OpenTelemetry is the merging of OpenCensus and OpenTracing into a single project.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Parses the buffer into the buffer .
- Extract a context from a carrier header .
- Apply a tracing configuration to the map .
- Extracts the span context from the header .
- Emits a span .
- Configure otp metrics exporter .
- Generate a span .
- Make a request .
- Fetch data from URL
- Imports a collection of metrics .
opentelemetry-java Key Features
opentelemetry-java Examples and Code Snippets
Community Discussions
Trending Discussions on opentelemetry-java
QUESTION
I'm trying to put together a minimal example of extracting metrics/traces from Akka using the OpenTelemetry Java agent, before moving to one of the actual applications in our company. So I downloaded the Akka Actors Quickstart with Scala sample application and ran it with
...ANSWER
Answered 2022-Mar-15 at 20:29Levi's comment gave me the answer by pointing at https://github.com/open-telemetry/opentelemetry-java-instrumentation/discussions/4909. At the moment the OT agent has no support for Akka actors.
QUESTION
I am trying to extend OpenTelemetry java agent and I don't see any indication it is trying to load my jar. I am running the following cmd:
...ANSWER
Answered 2022-Mar-07 at 07:56- "otel.javaagent.extensions" is not supported in the config file. add it with -D.
- add the span processor to a config call implementing sdkTracerProviderConfigurer
QUESTION
I am trying to integrate opentelemetry in in my spring boot application with jaeger. I am running jaeger on my local machine (started with binary not with docker) and I am starting my spring boot application with following command:
java -javaagent:/Users//temp/opentelemetry-javaagent-all.jar -Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=localhost:14250 -Dotel.resource.attributes=service.name=playground-app -Dotel.javaagent.debug=false -Dotel.metrics.exporter=jaeger -Dotel.exporter.otlp.endpoint=localhost:14250 -Dotel.exporter.otlp.traces.endpoint=localhost:14250 -Dotel.exporter.otlp.metrics.endpoint=localhost:14250 -jar playground-app-0.0.1-SNAPSHOT.jar
when I hit a endpoint I am getting following error on command line:
[opentelemetry.auto.trace 2021-11-15 17:11:29:043 +0530] [grpc-default-executor-0] WARN io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter - Failed to export spans. Error message: UNIMPLEMENTED: unknown service opentelemetry.proto.collector.trace.v1.TraceService
followed by
[opentelemetry.auto.trace 2021-11-15 17:12:08:513 +0530] [grpc-default-executor-0] WARN io.opentelemetry.exporter.otlp.metrics.OtlpGrpcMetricExporter - Failed to export metrics io.grpc.StatusRuntimeException: UNIMPLEMENTED: unknown service opentelemetry.proto.collector.metrics.v1.MetricsService at io.grpc.Status.asRuntimeException(Status.java:533) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:533) at io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:464) at io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:428) at io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:461) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:617) at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:803) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:782) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)
Here is the dependencies section from build.gradle
...ANSWER
Answered 2021-Nov-19 at 20:16My guess:
-Dotel.metrics.exporter=jaeger
is a problem. What I have seen only prometheus metrics exporter is implemented for now (if you are using https://github.com/open-telemetry/opentelemetry-java-instrumentation). There is no jaeger metric exporter.
Also I don't understand why you need OTLP endpoint (OTLP != Jaeger). I would remove them:
QUESTION
I would like to use opentelemetry-java-instrumentation with AWS OTEL collector and X-Ray. Unfortunately, AWS OTEL aws-xray exporter is not able to export generated traces to X-Ray because generated trace ID is invalid X-Ray trace ID:
...ANSWER
Answered 2021-Oct-28 at 16:22Actually, AWS maintains own a redistribution of the OpenTelemetry Agent for Java, which is customized for AWS services (X-Ray included).
QUESTION
I am trying to export metrics and traces from my Akka app written in Scala using OpenTelemetry agent with the purpose of consuming the data in OpenSearch.
Technology stack for my application:
- Akka - 2.6.*
- RabbitMQ (amqp client 5.12.*)
- PostgreSQL (jdbc 42.2.*)
I've added OpenTelemetry instrumentation runtime dependency to build.sbt
:
ANSWER
Answered 2021-Oct-14 at 14:01Ok so I got around by running across this issue and then reading about how to surpress specific instrumentations.
So to reduce clutter in tracing dashboard, one would add something as following to the properties file (or equivalent via environment variables):
QUESTION
I've got a Spring Boot application that'd I'd like to automatically generate traces for using the OpenTelemetry Java agent, and subsequently upload those traces to Google Cloud Trace.
I've added the following code to the entry point of my application for sending traces:
...ANSWER
Answered 2021-Sep-14 at 23:00I ended up resolving this as follows:
- Clone the GoogleCloudPlatform / opentelemetry-operations-java repo
git clone git@github.com:GoogleCloudPlatform/opentelemetry-operations-java.git
- Build the
exporter-auto
project
./gradlew clean :exporter-auto:shadowJar
Copy the jar produced in
exporter-auto/build/libs
to my target projectRun the application with the following arguments:
-javaagent:path/to/opentelemetry-javaagent-all.jar
-Dotel.javaagent.experimental.extensions=[artifact-from-step-3].jar
-Dotel.traces.exporter=google_cloud_trace
-Dotel.metrics.exporter=none
-jar myapp.jar
Note: This setup does not require any explicit code changes in the target code base.
QUESTION
I am very new to using OpenTelemetry and have just tried configuring it to send traces to my Zipkin server. Unfortunately , after configuring the agent by specifying zipkin exporter details , I could see an exception in the console. I used Petclic as sample spring boot and have followed the documentation here https://github.com/open-telemetry/opentelemetry-java-instrumentation
Here is the command that I used to start spring-boot app(I have my zipkin server running at localhost:9411):
java -javaagent:opentelemetry-javaagent-all.jar -Dotel.exporter=zipkin -Dotel.exporter.zipkin.endpoint=localhost:9411 -jar spring-petclinic-2.4.2.jar
Exception in the console (It is trying to connect to gRpc exporter instead of Zipkins):
...ANSWER
Answered 2021-Mar-16 at 11:40In your command please try the following -Dotel.traces.exporter=zipkin instead of -Dotel.exporter=zipkin
QUESTION
I have an application which is made up of multiple services built in proprietary language. I want to collect traces and ingest into Jaeger or APM solution. There is no instrumentation library. However, these services produce traces in a proprietary format. I want to convert these traces to OpenTelemetry traces and ingest into Jaeger or APM solution.
I started using OpenTelemetry-Java SDK.
...ANSWER
Answered 2021-Mar-05 at 13:54You can set the service name in the code as follows:
QUESTION
I'm new to the world of Opentelemetry and would like to send the Spring-petclinic instrumentation data to Jaeger which is running on my remote cloud system
Here is the bat file:
java -javaagent:opentelemetry-javaagent-all.jar -Dotel.exporter=jaeger -Dotel.exporter.jaeger.endpoint=50.18.XXX.XX:14250 -Dotel.otlp.span.timeout=4000 -Dotel.jaeger.service.name=otel-ui -jar target/spring-petclinic-2.4.0.BUILD-SNAPSHOT.jar
When I run the bat file, I'm abe to open the petclinic app in browser (http://localhost:8080), I get the following error in the console:
[opentelemetry.auto.trace 2021-01-06 17:22:21:008 +0530] [grpc-default-executor-1] WARN io.opentelemetry.exporter.otlp.OtlpGrpcSpanExporter - Failed to export spans. Error message: UNAVAILABLE: io exception
How to resolve this issue? Are there any other dependencies to be the added to the petclinic pom.xml or to the code?
...ANSWER
Answered 2021-Jan-10 at 04:52Can you paste the Collector config file? It seems you are using the gRPC protocol and it's not supported on the system where the collector is running. https://github.com/open-telemetry/opentelemetry-collector/blob/master/exporter/otlpexporter/README.md
QUESTION
I wrote a javaagent
as below to capture the execution time of the execute
method of the apache org.apache.http.client.HttpClient
. It is capturing the time, but it's running three times.
ANSWER
Answered 2020-Oct-26 at 06:26First of all, where do you get the implementsInterface
element matcher from? It is not part of ByteBuddy, at least not in the current version. I replaced it by isSubTypeOf
in order to make the code compile. Anyway, if you activate logging like this
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install opentelemetry-java
Please refer to the contribution guide on how to set up for development and contribute!.
Snapshots based out the main branch are available for opentelemetry-api, opentelemetry-sdk and the rest of the artifacts. We strongly recommend using our published BOM to keep all dependency versions in sync.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page