Skip to content

Conversation

@trentm
Copy link
Member

@trentm trentm commented Nov 7, 2025

This includes all likely to be relevant envvars in the preamble log
message to help with clarity and debugging. The value of envvars are
included if they are on the allowlist of known to not be sensitive
envvars. Otherwise the value is redacted.

(I think there would still be value to a string representation of the
SDK components. However that is larger work that could be done
separately.)

Closes: #1018

…preamble log.info

This includes all likely to be relevant envvars in the preamble log
message to help with clarity and debugging. The *value* of envvars are
included if they are on the allowlist of known to not be sensitive
envvars. Otherwise the value is redacted.

(I think there would still be value to a string representation of the
SDK components. However that is larger work that could be done
separately.)

Closes: #1018
@trentm trentm self-assigned this Nov 7, 2025
@trentm trentm requested a review from a team as a code owner November 7, 2025 20:31
@trentm
Copy link
Member Author

trentm commented Nov 7, 2025

Here is an example. I have a few o... aliases (e.g. oquiet and opamp) that I use for setting some convenience envvars to configure EDOT Node.js and OTel JS for local dev. Now the preamble conveniently shows the actual envvars that were set:

% ofast opamp  oquiet npm run example | pino-pretty

> @elastic/[email protected] example
> cd ../../examples && node --import @elastic/opentelemetry-node simple-http-request.js

[12:31:58.616] WARN (elastic-otel-node): Unsupported OTLP metrics protocol: "undefined". Using http/protobuf.
[12:31:58.620] INFO (elastic-otel-node): start EDOT Node.js
    preamble: true
    distroVersion: "1.6.0"
    system: {
      "os": "darwin 24.6.0",
      "arch": "arm64",
      "runtime": "Node.js v20.19.1"
    }
    edotEnv: {
      "OTEL_METRIC_EXPORT_TIMEOUT": "5000",
      "OTEL_NODE_DISABLED_INSTRUMENTATIONS": "dns,net,runtime-node",
      "ELASTIC_OTEL_HOST_METRICS_DISABLED": "true",
      "ELASTIC_OTEL_OPAMP_ENDPOINT": "http://localhost:4320",
      "OTEL_METRIC_EXPORT_INTERVAL": "5000",
      "OTEL_NODE_RESOURCE_DETECTORS": "env,host,os,process,serviceinstance",
      "ELASTIC_OTEL_EXPERIMENTAL_OPAMP_HEARTBEAT_INTERVAL": "5000"
    }
    configInfo: {
      "logLevel": "info"
    }
...

@trentm trentm requested a review from a team as a code owner November 7, 2025 20:35
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

🔍 Preview links for changed docs

@trentm trentm merged commit 50120cd into main Nov 10, 2025
13 checks passed
@trentm trentm deleted the trentm-better-preamble-config branch November 10, 2025 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dump configuration on startup

4 participants