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 support for Micrometer tracing #30156

Closed
mhalbritter opened this issue Mar 10, 2022 · 5 comments
Closed

Add support for Micrometer tracing #30156

mhalbritter opened this issue Mar 10, 2022 · 5 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@mhalbritter
Copy link
Contributor

Extracted from #29666

Micrometer Tracing comes with the following features

  • Abstraction over a Tracer (Tracer is a library handling a lifecycle of a span. Span is wrapping an action that we would like to measure. Span contains information such as timing, span id - unique identifier for an action, trace id - same identifier for all actions within the same business transaction)
  • Tracer bridges. We're bridging from the abstraction to a concrete tracer implementation. We support the following tracers
  • TracingObservationHandler interface and its implementations
  • Span exporters /reporters (to visualize latency we should send spans to a reporting system such as Wavefront)
    • Zipkin with Brave
    • Anything that OTel provides out of the box (Zipkin, OTLP etc.)
    • Wavefront with Brave and OTel

We need Boot to configure the Bridges with all of their features.

@mhalbritter mhalbritter added the type: enhancement A general enhancement label Mar 10, 2022
@mhalbritter mhalbritter added this to the 3.0.x milestone Mar 10, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 11, 2022
- Add dependency management for micrometer-tracing-api
- TracingObservationHandlers are grouped into a
  FirstMatchingCompositeObservationHandler, when found.

See spring-projectsgh-30156
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 11, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 11, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 11, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 11, 2022
- Add dependency management for micrometer-tracing-api
- TracingObservationHandlers are grouped into a
  FirstMatchingCompositeObservationHandler, when found.

See spring-projectsgh-30156
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 11, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 11, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 15, 2022
- Add dependency management for micrometer-tracing-api
- TracingObservationHandlers are grouped into a
  FirstMatchingCompositeObservationHandler, when found.

See spring-projectsgh-30156
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 15, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 15, 2022
@mhalbritter mhalbritter self-assigned this Mar 15, 2022
@mhalbritter
Copy link
Contributor Author

mhalbritter commented Mar 15, 2022

Base infrastructure

  • A lot of the auto-configurations can be used from Spring Cloud Sleuth: brave and otel
  • We need to create a Micrometer DefaultTracingObservationHandler bean
  • This needs a Micrometer Tracer. There are two tracer implementations shipped with Micrometer, BraveTracer and OtelTracer

Brave

  • Code in micrometer
  • To create a Micrometer BraveTracer, we need a brave Tracer and some other stuff, which all needs Brave Tracing
  • Tracing can be customized with some options like the local service name, etc. The reported spans are handled by brave SpanHandlers.

Brave & Zipkin

Zipkin is implemented as a Brave SpanHandler

var sender = URLConnectionSender.create("http://127.0.0.1:9411/api/v2/spans");
var spanReporter = AsyncReporter.builder(sender).build();
var spanHandler = new ZipkinSpanHandler.newBuilder(spanReporter).alwaysReportSpans(true).build();

I guess there are a lot more of the sender implementations.

Brave & Wavefront

  • Wavefront is implemented as a brave SpanHandler, see here

Open Telemetry

Open Telemetry & Wavefront

  • Wavefront is implemented a a otel SpanExporter, see here

mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 16, 2022
- Add dependency management for micrometer-tracing-api
- TracingObservationHandlers are grouped into a
  FirstMatchingCompositeObservationHandler, when found.

See spring-projectsgh-30156
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 16, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 16, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 16, 2022
- Configure Zipkin
- Configure Brave
- Configure OpenTelemetry
- Configure Micrometer Tracing bridges for OpenTelemetry and Brave
- Create the ObservationHandler for tracing with Micrometer

See spring-projectsgh-30156
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 16, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 16, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 16, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 16, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 16, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 17, 2022
- Add dependency management for micrometer-tracing-api
- TracingObservationHandlers are grouped into a
  FirstMatchingCompositeObservationHandler, when found.

See spring-projectsgh-30156
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 17, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 17, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 17, 2022
- Configure Zipkin
- Configure Brave
- Configure OpenTelemetry
- Configure Micrometer Tracing bridges for OpenTelemetry and Brave
- Create the ObservationHandler for tracing with Micrometer

See spring-projectsgh-30156
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Mar 17, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
- Configure Zipkin
- Configure Brave
- Configure OpenTelemetry
- Configure Micrometer Tracing bridges for OpenTelemetry and Brave
- Create the ObservationHandler for tracing with Micrometer

See spring-projectsgh-30156
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
- Settings moved from management.metrics.export.wavefront to
  management.wavefront.metrics and management.wavefront
- WavefrontSender is created by WavefrontAutoConfiguration and is used
  by the tracing and metrics auto-configurations
- Users can no longer supply a WavefrontConfig bean. WavefrontConfig
  comes from micrometer-core and was used to build the WavefrontSender.
  The WavefrontSender is used by tracing, which doesn't rely on
  micrometer-core. The sender can be configured as usual through
  properties

See spring-projectsgh-30156
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 13, 2022
mhalbritter added a commit to mhalbritter/spring-boot that referenced this issue Apr 14, 2022
- Configure Zipkin
- Configure Wavefront
- Configure Brave
- Configure OpenTelemetry
- Configure Micrometer Tracing bridges for OpenTelemetry and Brave
- Create the ObservationHandler for tracing with Micrometer

Closes spring-projectsgh-30156
@wilkinsona wilkinsona modified the milestones: 3.0.x, 3.0.0-M3 Apr 14, 2022
@FranPregernik

This comment was marked as outdated.

@mhalbritter

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants