Skip to content

Commit 8fcaa90

Browse files
committed
format
1 parent 4476bdc commit 8fcaa90

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ To build the all of examples, run:
9292
excluding specific endpoints from tracing.
9393
- Note: This example requires Java 17 or higher.
9494
- [Declarative Configuration with the OpenTelemetry Spring Boot Starter](spring-declarative-configuration)
95-
- This module demonstrates how to use declarative configuration with the
96-
OpenTelemetry Spring Boot Starter to configure tracing behavior,
97-
including excluding specific endpoints from tracing.
98-
- Note: This example requires Java 17 or higher.
95+
- This module demonstrates how to use declarative configuration with the
96+
OpenTelemetry Spring Boot Starter to configure tracing behavior,
97+
including excluding specific endpoints from tracing.
98+
- Note: This example requires Java 17 or higher.
9999

100100
## Contributing
101101

spring-declarative-configuration/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ otel:
145145
```
146146
147147
This configuration:
148+
148149
- Uses the `rule_based_routing` sampler from the OpenTelemetry contrib extension
149150
- Excludes health check endpoints (`/actuator.*`) from tracing using the `DROP` action
150151
- Samples all other requests using the `always_on` fallback sampler
@@ -162,7 +163,7 @@ This configuration:
162163
### Property Metadata and IDE Auto-Completion
163164

164165
Most IDEs derive auto-completion for Spring properties from Spring Boot configuration metadata. At
165-
the time of this example, that metadata is primarily based on the **non-declarative** configuration
166+
the time of this example, that metadata is primarily based on the **non-declarative** configuration
166167
schema.
167168

168169
As a result:
@@ -197,7 +198,7 @@ otel:
197198
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:http://localhost:4318}/v1/traces
198199
```
199200

200-
Here, `http://localhost:4318` is used as the default if the `OTEL_EXPORTER_OTLP_ENDPOINT`
201+
Here, `http://localhost:4318` is used as the default if the `OTEL_EXPORTER_OTLP_ENDPOINT`
201202
environment variable is not set.
202203

203204
When copying configuration from non-Spring examples, always convert `:-` to `:` in placeholders.
@@ -217,7 +218,7 @@ this repository contains an example of this:
217218

218219
- See `configureSampler` in
219220
[`OpenTelemetryConfig`](../spring-native/src/main/java/io/opentelemetry/example/graal/OpenTelemetryConfig.java)
220-
- It uses `RuleBasedRoutingSampler` programmatically to drop spans for actuator endpoints
221+
- It uses `RuleBasedRoutingSampler` programmatically to drop spans for actuator endpoints
221222
(`/actuator*`), replicating the behavior we achieve declaratively via YAML in this module
222223

223224
In many cases, you can start with declarative configuration (as in this module) and only fall back
@@ -228,20 +229,20 @@ to programmatic customization for highly dynamic or application-specific logic.
228229
If the behavior is not what you expect, here are a few things to check:
229230

230231
- **Health checks are still traced**
231-
- Verify the `rules` section under `otel.tracer_provider.sampler.rule_based_routing` in
232+
- Verify the `rules` section under `otel.tracer_provider.sampler.rule_based_routing` in
232233
`application.yaml`
233-
- Ensure the `pattern` matches your actual actuator paths (e.g., `/actuator.*`)
234-
- Confirm that `span_kind` is set to `SERVER` (or another correct span kind for your traffic)
234+
- Ensure the `pattern` matches your actual actuator paths (e.g., `/actuator.*`)
235+
- Confirm that `span_kind` is set to `SERVER` (or another correct span kind for your traffic)
235236

236237
- **No spans are exported**
237-
- Confirm that `otel.file_format` is set correctly (for example, `"1.0-rc.2"`)
238-
- Check that at least one exporter is configured (e.g., `otlp_http` or `console`)
239-
- Look for startup warnings or errors related to OpenTelemetry configuration
238+
- Confirm that `otel.file_format` is set correctly (for example, `"1.0-rc.2"`)
239+
- Check that at least one exporter is configured (e.g., `otlp_http` or `console`)
240+
- Look for startup warnings or errors related to OpenTelemetry configuration
240241

241242
- **Properties seem to be ignored**
242-
- Make sure you are modifying the correct `application.yaml` for the active Spring profile
243-
- Verify that all configuration keys are indented correctly under the `otel:` root
244-
- Double-check that any placeholders use `:` for defaults (e.g.,
243+
- Make sure you are modifying the correct `application.yaml` for the active Spring profile
244+
- Verify that all configuration keys are indented correctly under the `otel:` root
245+
- Double-check that any placeholders use `:` for defaults (e.g.,
245246
`${OTEL_EXPORTER_OTLP_ENDPOINT:http://localhost:4318}`)
246247

247248
If issues persist, compare your configuration to:
@@ -250,4 +251,3 @@ If issues persist, compare your configuration to:
250251
- The Java Agent example in [`javaagent-declarative-configuration`](../javaagent-declarative-configuration)
251252
- The reference schemas and examples in
252253
[opentelemetry-configuration](https://github.com/open-telemetry/opentelemetry-configuration)
253-

0 commit comments

Comments
 (0)