Skip to content
Open
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
8 changes: 8 additions & 0 deletions calm-hub/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,14 @@
<artifactId>quarkus-jacoco</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-opentelemetry</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-logging-json</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
44 changes: 11 additions & 33 deletions calm-hub/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -171,36 +171,14 @@ calm.mcp.enabled=false
quarkus.log.category."org.finos.calm".level=DEBUG
quarkus.log.category."org.mongodb.driver".level=OFF

# OpenTelemetry β€” the extension is always compiled in (quarkus.otel.enabled is a
# build-time flag; a build-once-deploy-many pipeline can't flip it per environment)
# and disabled at runtime by default via the genuinely runtime-mutable
# quarkus.otel.sdk.disabled. Set CALM_OTEL_DISABLED=false on the deployed
# container/process to turn it on β€” no rebuild required.
quarkus.otel.service.name=${OTEL_SERVICE_NAME:calm-hub}
quarkus.otel.enabled=true
quarkus.otel.sdk.disabled=${CALM_OTEL_DISABLED:true}
quarkus.otel.exporter.otlp.endpoint=${OTEL_EXPORTER_OTLP_ENDPOINT:http://localhost:4317}
quarkus.otel.traces.sampler=parentbased_traceidratio
quarkus.otel.traces.sampler.arg=${CALM_OTEL_SAMPLING_RATIO:1.0}
# Micrometer has no equivalent runtime-mutable switch β€” quarkus.micrometer.enabled
# and the binder .enabled properties below are all build-time-fixed (they decide
# which binder beans get compiled in at all), so CALM_OTEL_METRICS_ENABLED is a
# build-time knob: it must be set when the artifact is built, not per-deployment.
quarkus.micrometer.enabled=true
quarkus.micrometer.binder.http-server.enabled=${CALM_OTEL_METRICS_ENABLED:false}
quarkus.micrometer.binder.http-client.enabled=${CALM_OTEL_METRICS_ENABLED:false}

# Disable Micrometer to avoid noise across every test profile in this module β€”
# quarkus.micrometer.enabled is build/run-time-fixed per active profile NAME (the
# same pitfall the jacoco comment above documents), so a %test. prefix only
# applies when a test's QuarkusTestProfile.getConfigProfile() is literally "test";
# each custom profile name used in this module needs its own override or
# Micrometer's core registry (and its auto-enabled binders) stays active under it.
# quarkus.otel.sdk.disabled needs no such per-profile treatment: it's genuinely
# RUN_TIME-scoped and already defaults to disabled everywhere, tests included.
%test.quarkus.micrometer.enabled=false
%integration-test.quarkus.micrometer.enabled=false
%nitrite-integration-test.quarkus.micrometer.enabled=false
%secure.quarkus.micrometer.enabled=false
%proxy-auth.quarkus.micrometer.enabled=false
%oidc.quarkus.micrometer.enabled=false
# OpenTelemetry configuration

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Every other toggle in this file documents its default and how to override it in a comment (see calm.mcp.enabled, calm.readonly, the audit-logging block above). This block just says "OpenTelemetry configuration" β€” name CALM_OTEL_ENABLED / OTEL_EXPORTER_OTLP_ENDPOINT (and CALM_JSON_LOGGING_ENABLED per the fix above) explicitly so it matches the existing convention.

# Enable OTLP trace export via CALM_OTEL_ENABLED (default: false)
# Configure collector endpoint via OTEL_EXPORTER_OTLP_ENDPOINT (default: http://localhost:4317)
quarkus.otel.enabled=${CALM_OTEL_ENABLED:false}
quarkus.otel.exporter.otlp.traces.endpoint=${OTEL_EXPORTER_OTLP_ENDPOINT:http://localhost:4317}

# JSON Logging configuration
# Enable JSON console logging via CALM_JSON_LOGGING_ENABLED (default: false)
quarkus.log.console.json=${CALM_JSON_LOGGING_ENABLED:false}


Loading