Skip to content

Commit

Permalink
Fix #115: Add TraceID/SpanID to Monitoring for Enhanced Observability (
Browse files Browse the repository at this point in the history
…#116)

* Fix #115: Add TraceID/SpanID to Monitoring for Enhanced Observability
  • Loading branch information
jandusil authored Feb 6, 2024
1 parent cbb4388 commit 4a6e904
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/Configuration-Properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ The User Data Store uses the following public configuration properties:
| Property | Default | Note |
|--------------------------------------------|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `user-data-store.db.master.encryption.key` | `_empty_` | Master DB encryption key (AES-256, key length of 32 bytes, base64 encoded) to derive server private keys for the encryption of sensitive data in the database. An empty value means no encryption, which is not recommended. |

# Monitoring and Observability

| Property | Default | Note |
|-------------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `management.tracing.sampling.probability` | `1.0` | Specifies the proportion of requests that are sampled for tracing. A value of 1.0 means that 100% of requests are sampled, while a value of 0 effectively disables tracing. |
19 changes: 19 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,25 @@
<version>${springdoc-openapi-starter-webmvc-ui.version}</version>
</dependency>

<!-- Monitoring -->
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core-micrometer</artifactId>
</dependency>

<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-tracing-bridge-otel</artifactId>
</dependency>

<!-- For run at Apple M1 architecture -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<scope>runtime</scope>
<classifier>osx-aarch_64</classifier>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ user-data-store.db.master.encryption.key=${USER_DATA_STORE_MASTER_ENCRYPTION_KEY
server.servlet.context-path=/user-data-store

logging.config=${USER_DATA_STORE_LOGGING:}

# Monitoring
management.tracing.sampling.probability=1.0

0 comments on commit 4a6e904

Please sign in to comment.