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

Fix tracing properties in docker compose #5946

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions src/docker-compose/docker-compose-wavefront.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,30 @@ version: '3'
# - WAVEFRONT_URI (optional) can be used to set the wavefront uri. Defaults to https://vmware.wavefront.com
# - WAVEFRONT_SOURCE (optional) can be used to set the wavefront source name. Defaults to scdf-docker-compose

# NOTE: In Boot 3.0 - 3.3 only global tracing property 'management.tracing.enabled' is available.
# This means in order to disable the other tracer reporters we have to exclude their tracing
# auto-configuration. In Boot 3.4 there is a specific enabled property
# 'management.<product>.tracing.export.enabled' that simplifies this by not requiring the
# auto-configuration exclusion. However, to support all versions of Boot 3.0 - 3.4 we add
# both sets of properties in env vars below.

services:
dataflow-server:
environment:
- MANAGEMENT_WAVEFRONT_APITOKEN=${WAVEFRONT_KEY:?WAVEFRONT_KEY is not set!}
- MANAGEMENT_WAVEFRONT_URI=${WAVEFRONT_URI:-https://vmware.wavefront.com}
- MANAGEMENT_WAVEFRONT_SOURCE=${WAVEFRONT_SOURCE:-scdf-docker-compose}
- MANAGEMENT_WAVEFRONT_METRICS_EXPORT_ENABLED=true
- MANAGEMENT_WAVEFRONT_METRICS_EXPORT_APITOKEN=${WAVEFRONT_KEY:?WAVEFRONT_KEY is not set!}
- MANAGEMENT_WAVEFRONT_METRICS_EXPORT_URI=${WAVEFRONT_URI:-https://vmware.wavefront.com}
- MANAGEMENT_WAVEFRONT_METRICS_EXPORT_SOURCE=${WAVEFRONT_SOURCE:-scdf-docker-compose}
- SPRING_CLOUD_DATAFLOW_APPLICATIONPROPERTIES_STREAM_MANAGEMENT_TRACING_ENABLED=true
- SPRING_CLOUD_DATAFLOW_APPLICATIONPROPERTIES_STREAM_MANAGEMENT_TRACING_SAMPLING_PROBABILITY=1.0
- SPRING_CLOUD_DATAFLOW_APPLICATIONPROPERTIES_STREAM_MANAGEMENT_WAVEFRONT_TRACING_EXPORT_ENABLED=true
- SPRING_CLOUD_DATAFLOW_APPLICATIONPROPERTIES_STREAM_SPRING_AUTOCONFIGURE_EXCLUDE=org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinAutoConfiguration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add this exclude for the skipper-server?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, dataflow replicates these common properties to the apps prior to handing off to skipper (see

* spring.cloud.dataflow.applicationProperties.stream.* and spring.cloud.dataflow.applicationProperties.task.* as well.
)

- SPRING_APPLICATION_JSON={"spring.jpa.properties.hibernate.generate_statistics":true}

skipper-server:
environment:
- MANAGEMENT_WAVEFRONT_APITOKEN=${WAVEFRONT_KEY:?WAVEFRONT_KEY is not set!}
- MANAGEMENT_WAVEFRONT_URI=${WAVEFRONT_URI:-https://vmware.wavefront.com}
- MANAGEMENT_WAVEFRONT_SOURCE=${WAVEFRONT_SOURCE:-scdf-docker-compose}
- MANAGEMENT_WAVEFRONT_METRICS_EXPORT_ENABLED=true
- MANAGEMENT_WAVEFRONT_METRICS_EXPORT_APITOKEN=${WAVEFRONT_KEY:?WAVEFRONT_KEY is not set!}
- MANAGEMENT_WAVEFRONT_METRICS_EXPORT_URI=${WAVEFRONT_URI:-https://vmware.wavefront.com}
- MANAGEMENT_WAVEFRONT_METRICS_EXPORT_SOURCE=${WAVEFRONT_SOURCE:-scdf-docker-compose}
- SPRING_APPLICATION_JSON={"spring.jpa.properties.hibernate.generate_statistics":true}
8 changes: 8 additions & 0 deletions src/docker-compose/docker-compose-zipkin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ version: '3'
# Extends the default docker-compose.yml with Zipkin Server distributed tracing configuration.
# Usage: docker-compose -f ./docker-compose.yml -f ./docker-compose-zipkin.yml up

# NOTE: In Boot 3.0 - 3.3 only global tracing property 'management.tracing.enabled' is available.
# This means in order to disable the other tracer reporters we have to exclude their tracing
# auto-configuration. In Boot 3.4 there is a specific enabled property
# 'management.<product>.tracing.export.enabled' that simplifies this by not requiring the
# auto-configuration exclusion. However, to support all versions of Boot 3.0 - 3.4 we add
# both sets of properties in env vars below.

services:

zipkin-server:
Expand All @@ -19,3 +26,4 @@ services:
- SPRING_CLOUD_DATAFLOW_APPLICATIONPROPERTIES_STREAM_MANAGEMENT_TRACING_SAMPLING_PROBABILITY=1.0
- SPRING_CLOUD_DATAFLOW_APPLICATIONPROPERTIES_STREAM_MANAGEMENT_ZIPKIN_TRACING_EXPORT_ENABLED=true
- SPRING_CLOUD_DATAFLOW_APPLICATIONPROPERTIES_STREAM_MANAGEMENT_ZIPKIN_TRACING_ENDPOINT=http://zipkin-server:9411/api/v2/spans
- SPRING_CLOUD_DATAFLOW_APPLICATIONPROPERTIES_STREAM_SPRING_AUTOCONFIGURE_EXCLUDE=org.springframework.boot.actuate.autoconfigure.tracing.wavefront.WavefrontTracingAutoConfiguration
Loading