This is an automated email from the ASF dual-hosted git repository.

dimas pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new a9785a00 Disable OTel SDK by default (#924)
a9785a00 is described below

commit a9785a0049f63189d9ccf6209e9de5dd6b08c53e
Author: Dmitri Bourlatchkov <[email protected]>
AuthorDate: Tue Feb 4 10:09:26 2025 -0500

    Disable OTel SDK by default (#924)
    
    * Disable OTel SDK by default
    
    Set `quarkus.otel.sdk.disabled` to `true` by default to avoid spurious
    "connection refused" warnings, for example:
    
    ```
    2025-01-31 20:51:56,989 WARNING 
[io.qua.ope.run.exp.otl.sen.VertxGrpcSender] [,] [,,,] 
(vert.x-eventloop-thread-2) Failed to export TraceRequestMarshalers. The 
request could not be executed. Full error message: Connection refused: 
localhost/127.0.0.1:4317
    ```
    
    Proper trace collection requires running some additional infrastructure,
    so enabling it by default is not very meaningful. When OTel collectors
    are available `quarkus.otel.sdk.disabled` can be set to `false` to re-enable
    tracing at the server start time.
---
 .../src/main/resources/application-test.properties       |  1 -
 .../defaults/src/main/resources/application.properties   |  7 ++++++-
 site/content/in-dev/unreleased/telemetry.md              | 16 ++++++++++------
 3 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/quarkus/defaults/src/main/resources/application-test.properties 
b/quarkus/defaults/src/main/resources/application-test.properties
index f8b7c722..f4325db3 100644
--- a/quarkus/defaults/src/main/resources/application-test.properties
+++ b/quarkus/defaults/src/main/resources/application-test.properties
@@ -21,4 +21,3 @@
 # Per-test specific configuration should use QuarkusTestProfile
 
 quarkus.log.file.enable=false
-quarkus.otel.sdk.disabled=true
diff --git a/quarkus/defaults/src/main/resources/application.properties 
b/quarkus/defaults/src/main/resources/application.properties
index 5c7afdf9..c40034f2 100644
--- a/quarkus/defaults/src/main/resources/application.properties
+++ b/quarkus/defaults/src/main/resources/application.properties
@@ -64,8 +64,13 @@ quarkus.management.test-port=0
 quarkus.micrometer.enabled=true
 quarkus.micrometer.export.prometheus.enabled=true
 
+# quarkus.otel.enabled is a build-time property. If it is disabled at build 
time, it will not be
+# possible to reset it at runtime, consequently all OTel functionality will be 
disabled.
 quarkus.otel.enabled=true
-quarkus.otel.sdk.disabled=false
+# quarkus.otel.sdk.disabled is set to `true` by default to avoid spuriour 
errors about
+# trace collector connections being impossible to establish. This setting can 
be enabled
+# at runtime after configuring other OTel properties for proper trace data 
collection.
+quarkus.otel.sdk.disabled=true
 # quarkus.otel.exporter.otlp.endpoint=http://otlp-collector:4317
 # 
quarkus.otel.resource.attributes=service.name=polaris,deployment.env=prod,region=us-west-2
 # quarkus.otel.service.name=polaris
diff --git a/site/content/in-dev/unreleased/telemetry.md 
b/site/content/in-dev/unreleased/telemetry.md
index eae7037b..1e378991 100644
--- a/site/content/in-dev/unreleased/telemetry.md
+++ b/site/content/in-dev/unreleased/telemetry.md
@@ -53,13 +53,17 @@ Traces are published using [OpenTelemetry].
 
 [OpenTelemetry]: https://quarkus.io/guides/opentelemetry-tracing
 
-To enable OpenTelemetry and publish traces for Polaris, set a valid collector 
endpoint URL with
-`http://` or `https://` as the server property 
`quarkus.otel.exporter.otlp.traces.endpoint`. The
-collector must talk the OpenTelemetry protocol (OTLP) and the port must be its 
gRPC port (by default
-4317), e.g. "http://otlp-collector:4317";. _If this property is not set, the 
server will not publish
-traces._
+By default OpenTelemetry is disabled in Polaris, because there is no 
reasonable default
+for the collector endpoint for all cases.
 
-You can disable OpenTelemetry at runtime by setting 
`quarkus.otel.sdk.disabled=true`.
+To enable OpenTelemetry and publish traces for Polaris set 
`quarkus.otel.sdk.disabled=false`
+and configure a valid collector endpoint URL with `http://` or `https://` as 
the server property
+`quarkus.otel.exporter.otlp.traces.endpoint`.
+
+_If these properties are not set, the server will not publish traces._
+
+The collector must talk the OpenTelemetry protocol (OTLP) and the port must be 
its gRPC port
+(by default 4317), e.g. "http://otlp-collector:4317";.
 
 By default, Polaris adds a few attributes to the [OpenTelemetry Resource] to 
identify the server,
 and notably:

Reply via email to