open-telemetry / opentelemetry-java

OpenTelemetry Java SDK
https://opentelemetry.io
Apache License 2.0
1.99k stars 826 forks source link

Provide Basic Contrib Libraries As Part of Early Releases #522

Closed kbrockhoff closed 4 years ago

kbrockhoff commented 5 years ago

Providing the equivalent of some of the OpenCensus contribs libraries would be useful in testing the usability of the APIs and the specification documentation while the APIs are still in alpha. I have already started this work and found a number of issues. See contribs-http branch here: https://github.com/kbrockhoff/opentelemetry-java/tree/contribs-http

bogdandrutu commented 5 years ago

This is a great suggestion. let's start building a small list of contribs that we want to verify alpha:

kbrockhoff commented 5 years ago

HTTP:

  1. Common support library (equivalent of OpenCensus http_util) - I completed this today.
  2. Java Servlet Filter
  3. JAX-RS Client Filter
  4. JAX-RS Container Filter
  5. JAX-WS Client Handler
  6. JAX-WS Server Handler
  7. Spring ClientHttpRequestInterceptor
  8. Spring AsyncClientHttpRequestInterceptor
  9. AWS SDK RequestHandler2

gRPC:

  1. ClientInterceptor 2.ServerInterceptor

JDBC: Wrappers for Driver and DataSource which in turn wrap Connection, Statement, PreparedStatement, CallableStatement

Spring Framework:

  1. Lifecycle listener which creates parent trace for all application startup activities and then one for all shutdown activities.
  2. Spring remoting request interceptor
  3. Spring CacheManager and Cache wrappers
  4. Spring AOP Aspect

Spring Boot:

  1. Actuator
  2. zPages endpoint

Logging: Population of logging context with current traceId and spanId for SLF4J and Apache Log4J2

Metrics adapters: Dropwizard, Micrometer

Eclipse MicroProfile: Integration with metrics, fault tolerance,

Resource retrievers: Major public cloud providers, k8s, major JEE app servers

pavolloffay commented 5 years ago

@kbrockhoff could you please share/brainstorm any ideas on integration with MicroProfile metrics and fault tolerance?

pavolloffay commented 5 years ago

We should also provide instrumentation for core java libraries (like https://github.com/opentracing-contrib/java-concurrent provides):

kbrockhoff commented 5 years ago

MicroProfile integration could include the export of metrics and events like those displayed in the Hystrix Dashboard such as RED, current circuit breaker status, bulkhead requests in waiting, retry counts, fallback counts.

Aggregated metrics from OpenTelemetry could also be read and used by circuit breaker open strategies and retry backoff strategies.

carlosalberto commented 4 years ago

Closing this @kbrockhoff please re-open if you think the current instrumentation effort doesn't handle this yet.