Constructs a new instance of the configuration class, initializing internal state and setting default values for endpoint, authentication token, and certificate file.
The class prioritizes values in the following order:
ATEL_DEFAULT_ENDPOINT, ATEL_DEFAULT_AUTH_TOKEN, ATEL_DEFAULT_TLS_PRIVATE_CA_CERT_FILE). This allows quick changes in behaviors without changing code of application configuration.OptionaldefaultEndpoint: URLThe default endpoint URL to use. If not provided, falls back to environment variable or internal default (grpc://localhost:4317).
OptionaldefaultAuthToken: stringThe default authentication token. If not provided, falls back to environment variable or internal default (undefined).
OptionaldefaultCertFile: stringThe default certificate file path. If not provided, falls back to environment variable or internal default (undefined).
Enables or disables debug mode.
Whether to enable debug mode (default: false).
The current instance for method chaining.
Set a logging endpoint to the configuration, overriding any previous endpoints.
The URL of the logging endpoint.
OptionalauthToken: stringOptional authentication token for the endpoint.
OptionalcertFile: stringOptional path to a certificate file for secure connections.
The current instance for method chaining.
Set a metrics endpoint to the configuration, overriding any previous endpoints.
The URL of the metrics endpoint.
OptionalauthToken: stringOptional authentication token for the endpoint.
OptionalcertFile: stringOptional path to a certificate file for secure connections.
The current instance for method chaining.
Sets whether to skip the internet connectivity check.
If true, the internet check will be skipped; otherwise, it will be performed.
The current instance for method chaining.
Set a trace endpoint to the configuration, overriding any previous endpoints.
The URL of the traceing endpoint.
OptionalauthToken: stringOptional authentication token for the endpoint.
OptionalcertFile: stringOptional path to a certificate file for secure connections.
The current instance for method chaining.
Sets the entropy value for the tracing session.
The entropy is typically used to introduce uniqueness into the tracing session, which can help with sampling or correlation.
A string representing the entropy value to be used for the tracing session.
The current instance for method chaining.
Sets whether console output should be used for logging or diagnostics. This value overrides all set endpoints. If required to send only one signal to console and not the other one(s), use endpoint network scheme "console:" for the specific signal stream(s) to be sent to the console.
If true, enables console output for all signal types; if
false, endpoints are used. Default for the Configuration is false
The current instance for method chaining.
Enables or disables cumulative for counter metrics and histograms temporality.
When enabled, metric instruments are exported using CUMULATIVE temporality (an ever-increasing total) instead of the default DELTA temporality (per-interval change).
Set true to export metrics as cumulative; set false to
use delta temporality.
The current instance for method chaining.
ATEL_USE_CUMULATIVE_METRICS is defined
(e.g., "true"/"yes"/"1"), it may take precedence over this programmatic setting.
Represents the configuration for OpenTelemetry endpoints and options.
Allows setting default endpoints, authentication tokens, and certificate files, as well as adding metrics and trace endpoints. Provides options for console output, metric export intervals, and skipping internet connectivity checks.
Remarks
Environment variables can override default endpoint, authentication token, and certificate file:
ATEL_DEFAULT_ENDPOINTATEL_DEFAULT_AUTH_TOKENATEL_DEFAULT_TLS_PRIVATE_CA_CERT_FILEATEL_METRICS_ENDPOINTATEL_METRICS_AUTH_TOKENATEL_METRICS_TLS_PRIVATE_CA_CERT_FILEATEL_TRACE_ENDPOINTATEL_TRACE_AUTH_TOKENATEL_TRACE_TLS_PRIVATE_CA_CERT_FILEATEL_LOGGING_ENDPOINTATEL_LOGGING_AUTH_TOKENATEL_LOGGING_TLS_PRIVATE_CA_CERT_FILEATEL_USE_CONSOLE(to route ALL OTEL signals to console output, this is not a per signal type flag)ATEL_METRICS_EXPORT_INTERVAL_MS(to set the interval for metrics export, default is 60000ms, minumum is 1000ms)ATEL_TRACES_EXPORT_INTERVAL_MS(to set the interval for metrics export, default is 60000ms, minumum is 1000ms)ATEL_LOGGING_EXPORT_INTERVAL_MS(to set the interval for logging export, default is 60000ms, minumum is 1000ms)ATEL_SKIP_INTERNET_CHECK(to skip the internet connectivity check, use "true" or "yes" or "1" to skip)ATEL_TRACING_SESSION_ENTROPY(to set the entropy for the tracing session, used to generate unique session IDs)ATEL_USE_CUMULATIVE_METRICS(This will set CUMULATIVE for counter and histogram metrics instead of the default DELTA)Example
All endpoint network schemes must be one of these schemes or that endpoint will log a warning and not function as expected:
All endpoints beginning with
http:orhttps:must use the url path "/v1/signal_type"" wheresignal_typesis one ofmetricsortracesfor metrics and tracing signals respectively.