Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
marcingrzejszczak committed Feb 9, 2024
1 parent 21050d2 commit 085822f
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
12 changes: 6 additions & 6 deletions docs/modules/ROOT/pages/api.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
== Using Micrometer Tracing Directly
= Using Micrometer Tracing Directly

In this section, we describe how to use the Micrometer Tracing API to directly create and report spans.

=== Micrometer Tracing Examples
== Micrometer Tracing Examples

The following example shows the basic operations on a span. Read the comments in the snippet for details:

Expand All @@ -25,7 +25,7 @@ The following example shows how to create a child span when explicitly knowing w
include::{include-java}/tracing/TracingApiTests.java[tags=manual_span_joining,indent=0]
-----

=== Micrometer Tracing Brave Setup
== Micrometer Tracing Brave Setup

In this subsection, we set up Micrometer Tracing with Brave.

Expand All @@ -36,7 +36,7 @@ The following example shows how to create a Micrometer Tracing `Tracer` by using
include::{include-java}/tracing/TracingApiTests.java[tags=brave_setup,indent=0]
-----

=== Micrometer Tracing OpenTelemetry Setup
== Micrometer Tracing OpenTelemetry Setup

In this subsection, we set up Micrometer Tracing with OpenTelemetry (OTel).

Expand All @@ -47,7 +47,7 @@ The following example shows how to create a Micrometer Tracing `Tracer` by using
include::{include-java}/tracing/TracingApiTests.java[tags=otel_setup,indent=0]
-----

=== Micrometer Tracing Baggage API
== Micrometer Tracing Baggage API

Traces connect from application to application by using header propagation. Besides trace identifiers, other properties (called `Baggage`) can also be passed along with the request.

Expand All @@ -65,7 +65,7 @@ IMPORTANT: For Brave, remember to set up the `PropagationFactory` so that it con
include::{include-java}/tracing/TracingApiTests.java[tags=baggage_brave_setup,indent=0]
-----

=== Aspect Oriented Programming
== Aspect Oriented Programming

Micrometer Tracing contains `@NewSpan`, `@ContinueSpan`, and `@SpanTag` annotations that frameworks can use to create or customize spans for either specific types of methods such as those serving web request endpoints or, more generally, to all methods.

Expand Down
10 changes: 5 additions & 5 deletions docs/modules/ROOT/pages/configuring.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== Configuring with Micrometer Observation
= Configuring with Micrometer Observation

=== Handler Configuration
== Handler Configuration

// TODO: We need to separately document that Micrometer provides a TimerObservationHandler

Expand Down Expand Up @@ -36,13 +36,13 @@ It also results in the following trace view in (for example) Zipkin:

image::tracing/zipkin.jpg[Trace Info propagation]

==== Ordered Handler Configuration
=== Ordered Handler Configuration

Micrometer Tracing comes with multiple `ObservationHandler` implementations.
To introduce ordering, you can use the `ObservationHandler.AllMatchingCompositeObservationHandler` to run logic for all `ObservationHandler` instances that match the given predicate and `ObservationHandler`. Use `FirstMatchingCompositeObservationHandler` to run logic only for the first `ObservationHandler` that matches the predicate.
The former can group handlers and the latter can be chosen to (for example) run only one matching `TracingObservationHandler`.

=== Context Propagation with Micrometer Tracing
== Context Propagation with Micrometer Tracing

To make https://docs.micrometer.io/context-propagation/reference/[Context Propagation] work with Micrometer Tracing, you need to manually register the proper `ThreadLocalAccessor`, as follows:

Expand All @@ -66,7 +66,7 @@ include::{include-integration-tests}/src/test/java/io/micrometer/tracing/test/co
include::{include-integration-tests}/src/test/java/io/micrometer/tracing/test/contextpropagation/AbstractObservationAwareSpanThreadLocalAccessorTests.java[tags=docs,indent=0]
-----

=== Exemplars
== Exemplars

To add support for https://grafana.com/docs/grafana/latest/fundamentals/exemplars/[exemplars] instead of using the `DefaultMeterObservationHandler` you should use the `TracingAwareMeterObservationHandler`, as follows:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/glossary.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
== Glossary
= Glossary

Micrometer Tracing contains a core module with an instrumentation https://en.wikipedia.org/wiki/Service_provider_interface[SPI], a set of modules containing bridges to various tracers, a set of modules containing dedicated span reporting mechanisms, and a test kit.
You need to understand the following definitions for distributed tracing:
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/reporters.adoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
== Supported Reporters
= Supported Reporters

Micrometer Tracing supports directly the following Reporters.

* https://tanzu.vmware.com/observability[*Tanzu Observability by Wavefront*]
* https://zipkin.io[*OpenZipkin Zipkin*]
=== Installing
== Installing

The following example shows the required dependency in Gradle (assuming that Micrometer Tracing BOM has been added):

Expand Down
8 changes: 4 additions & 4 deletions docs/modules/ROOT/pages/testing.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
== Testing
= Testing

Micrometer Tracing includes the `micrometer-tracing-test` and `micrometer-tracing-integration-test` modules.

Expand All @@ -15,7 +15,7 @@ It:
** Sets it up with OpenZipkin Zipkin Exporter
* Runs all the combinations above against the user code and running infrastructure
=== Installing
== Installing

The following example shows the required dependency in Gradle (assuming that Micrometer Tracing BOM has been added):

Expand All @@ -41,7 +41,7 @@ The following example shows the required dependency in Maven (assuming that Micr
</dependency>
-----

=== Running Tracing Unit Tests
== Running Tracing Unit Tests

To run unit tests of your custom handler, you may want to use the `SimpleTracer` test `Tracer` implementation. Let's assume the following custom `TracingObservationHandler`:

Expand All @@ -57,7 +57,7 @@ To verify whether the spans got properly created we can use the `SimpleTracer`,
include::{include-java}/tracing/TracingTestingTests.java[tags=handler_test,indent=0]
-----

=== Running integration tests
== Running integration tests

The following example shows how you can run your code to test your integrations:

Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/tracers.adoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
== Supported Tracers
= Supported Tracers

Micrometer Tracing supports the following Tracers.

* https://github.com/openzipkin/brave[*OpenZipkin Brave*]
* https://opentelemetry.io/[*OpenTelemetry*]
=== Installing
== Installing

The following example shows the required dependency in Gradle (assuming that the Micrometer Tracing BOM has been added):

Expand Down

0 comments on commit 085822f

Please sign in to comment.