elastic / elastic-otel-node

https://github.com/elastic/elastic-otel-node/tree/main/packages/opentelemetry-node#readme
Apache License 2.0
3 stars 2 forks source link

config review for GA #262

Closed trentm closed 1 month ago

trentm commented 2 months ago

Review all ELASTIC_OTEL_ and OTEL_ envvars/config that we should be supporting in the distro. Then create either separate issues, or use this as a tracking issue to support and test them.

trentm commented 2 months ago
david-luna commented 1 month ago

The following table contains all the env vars referred in the spec

General Configuration (link)

VAR Handled in Ref
OTEL_SDK_DISABLED SDK node-sdk
OTEL_RESOURCE_ATTRIBUTES SDK env-detector
OTEL_SERVICE_NAME SDK env-detector
OTEL_LOG_LEVEL SDK node-sdk
OTEL_PROPAGATORS SDK trace-sdk
OTEL_TRACES_SAMPLER SDK trace-sdk
OTEL_TRACES_SAMPLER_ARG SDK trace-sdk

Batch Span Processor (link)

VAR Handled in Ref
OTEL_BSP_SCHEDULE_DELAY SDK trace-sdk
OTEL_BSP_EXPORT_TIMEOUT SDK trace-sdk
OTEL_BSP_MAX_QUEUE_SIZE SDK trace-sdk
OTEL_BSP_MAX_EXPORT_BATCH_SIZE SDK trace-sdk

Batch Log Record Processor (link)

VAR Handled in Ref
OTEL_BLRP_SCHEDULE_DELAY SDK logs-sdk
OTEL_BLRP_EXPORT_TIMEOUT SDK logs-sdk
OTEL_BLRP_MAX_QUEUE_SIZE SDK logs-sdk
OTEL_BLRP_MAX_EXPORT_BATCH_SIZE SDK logs-sdk

Attribute Limits (link)

VAR Handled in Ref
OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT SDK logs-sdk trace-sdk
OTEL_ATTRIBUTE_COUNT_LIMIT SDK logs-sdk trace-sdk

Span Limits (link)

VAR Handled in Ref
OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT SDK sdk-trace-base
OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT SDK sdk-trace-base
OTEL_SPAN_EVENT_COUNT_LIMIT SDK trace-base-sdk
OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT Not handled
OTEL_LINK_ATTRIBUTE_COUNT_LIMIT Not handled

Log Record Limits (link)

VAR Handled in Ref
OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT SDK sdk-logs
OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT SDK sdk-logs

OTLP Exporter (link)

VAR Handled in Ref
OTEL_EXPORTER_OTLP_ENDPOINT SDK logs-http-exporter logs-grpc-exporter logs-proto-exporter traces-http-exporter traces.grpc-exporter traces-proto-exporter metrics-http-exporter metrics-grpc-exporter metrics-proto-exporter
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT SDK check above
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT SDK check above
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT SDK check above
OTEL_EXPORTER_OTLP_INSECURE Not handled grp-exporter-base defined but not used. Docs say "Implementations MAY choose to not implement the insecure option if it is not required or supported by the underlying gRPC client implementation."
OTEL_EXPORTER_OTLP_TRACES_INSECURE Not handled like OTEL_EXPORTER_OTLP_INSECURE
OTEL_EXPORTER_OTLP_METRICS_INSECURE Not handled
OTEL_EXPORTER_OTLP_LOGS_INSECURE Not handled
OTEL_EXPORTER_OTLP_CERTIFICATE Not handled grp-exporter-base utility function is implemented but not used
OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE Not Handled
OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE Not Handled
OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE Not Handled
OTEL_EXPORTER_OTLP_CLIENT_KEY Not Handled grpc-exporter-base utility function is implemented but not used
OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY Not Handled
OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY Not Handled
OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY Not Handled
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE Not Handled grpc-exporter-base utility function is implemented but not used
OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE Not Handled
OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE Not Handled
OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE Not Handled
OTEL_EXPORTER_OTLP_HEADERS SDK grpc-exporter-base need to check if http and proto handles them
OTEL_EXPORTER_OTLP_TRACES_HEADERS SDK http-traces-exporter grpc-traces-exporter proto-traces-exporter
OTEL_EXPORTER_OTLP_METRICS_HEADERS SDK metrics-http-exporter metrics-grpc-exporter metrics-proto-exporter
OTEL_EXPORTER_OTLP_LOGS_HEADERS SDK logs-http-exporter logs-grpc-exporter logs-proto-exporter
OTEL_EXPORTER_OTLP_COMPRESSION SDK grpc-exporter-base check why not in http & proto
OTEL_EXPORTER_OTLP_TRACES_COMPRESSION SDK base-exporter grpc-base-exporter seems redundant
OTEL_EXPORTER_OTLP_METRICS_COMPRESSION Not Handled
OTEL_EXPORTER_OTLP_LOGS_COMPRESSION Not Handled
OTEL_EXPORTER_OTLP_TIMEOUT SDK base-exporter
OTEL_EXPORTER_OTLP_TRACES_TIMEOUT Not Handled
OTEL_EXPORTER_OTLP_METRICS_TIMEOUT Not Handled
OTEL_EXPORTER_OTLP_LOGS_TIMEOUT SDK(partial) logs-http-exporter
OTEL_EXPORTER_OTLP_PROTOCOL
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL SDK sdk-node
OTEL_EXPORTER_OTLP_METRICS_PROTOCOL Distro elastic-sdk-node
OTEL_EXPORTER_OTLP_LOGS_PROTOCOL Distro elastic-sdk-node

Notes:

Zipkin Exporter (link)

VAR Handled in Ref
OTEL_EXPORTER_ZIPKIN_ENDPOINT SDK zipkin-exporter
OTEL_EXPORTER_ZIPKIN_TIMEOUT Not Handled

Prometheus Exporter (link)

VAR Handled in Ref
OTEL_EXPORTER_PROMETHEUS_HOST SDK prometheus-exporter
OTEL_EXPORTER_PROMETHEUS_PORT prometheus-exporter

Exporter Selection (link)

VAR Handled in Ref
OTEL_TRACES_EXPORTER SDK sdk-node
OTEL_METRICS_EXPORTER Not Handled the distro sets a single exporter based in the protocol but does not handle this var at all
OTEL_LOGS_EXPORTER Not Handled

Metrics SDK Configuration (link)

VAR Handled in Ref
OTEL_METRICS_EXEMPLAR_FILTER Not handled
OTEL_METRIC_EXPORT_INTERVAL Not handled
OTEL_METRIC_EXPORT_TIMEOUT Not handled

File Configuration (link)

VAR Handled in Ref
OTEL_EXPERIMENTAL_CONFIG_FILE Not handled
david-luna commented 1 month ago

This comment contains references to the nodejs specific env vars. References:

Enabled/disabled configurations

VAR Handled in Refs
OTEL_NODE_ENABLED_INSTRUMENTATIONS Not handled it is handled in auto-instrumentations
OTEL_NODE_DISABLED_INSTRUMENTATIONS Not handled it is handled in auto-instrumentations

Non-documented configurations

VAR Handled in Refs
OTEL_NODE_RESOURCE_DETECTORS Distro detectors
david-luna commented 1 month ago

Now for ELASTIC_OTEL_* vars we are going to enumerate them

VAR Description Refs
ELASTIC_OTEL_METRICS_DISABLED To disable metrics instrumentation/export in the distro. Vanilla SDK has no metrics by default elastic-node-sdk
ELASTIC_OTEL_LOG_DIRECTORY (still in discussion) directory where to place the log file apm-issue
ELASTIC_OTEL_LOG_TARGET (still in discussion) target of the logs apm-issue
david-luna commented 1 month ago

Summary of the conclusions after meeting @trentm:

Actions to be taken