Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor otlp exporter #146

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
152 changes: 127 additions & 25 deletions examples/kitchen-sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,8 @@ logger_provider:
max_export_batch_size: 512
# Configure exporter.
exporter:
# Configure exporter to be OTLP.
otlp:
# Configure protocol. Values include: http/protobuf, http/json, grpc.
protocol: http/protobuf
# Configure endpoint.
# If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317).
# Configure exporter to be OTLP with HTTP transport.
otlp_http:
endpoint: http://localhost:4318/v1/logs
# Configure certificate. Absolute path to certificate file.
# If omitted or null, system default certificate verification is used for secure connections.
Expand All @@ -72,7 +68,43 @@ logger_provider:
# Configure max time (in milliseconds) to wait for each export.
# If omitted or null, 10000 is used.
timeout: 10000
# Configure client transport security for the exporter's connection. Only applicable when .protocol is grpc and .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure.
# Configure the encoding used for messages. Values include: protobuf, json. Implementations may not support json.
# If omitted or null, protobuf is used.
encoding: protobuf
- # Configure a batch log record processor.
batch:
# Configure exporter.
exporter:
# Configure exporter to be OTLP with gRPC transport.
otlp_grpc:
# Configure endpoint.
# If omitted or null, http://localhost:4317 is used.
endpoint: http://localhost:4317
# Configure certificate. Absolute path to certificate file.
# If omitted or null, system default certificate verification is used for secure connections.
certificate: /app/cert.pem
# Configure mTLS private client key. Absolute path to client key in PEM format. If set, .client_certificate must also be set.
# If omitted or null, mTLS is not used.
client_key: /app/cert.pem
# Configure mTLS client certificate. Absolute path to certificate file. If set, .client_key must also be set.
# If omitted or null, mTLS is not used.
client_certificate: /app/cert.pem
# Configure headers. Entries have higher priority than entries from .headers_list.
# If an entry's .value is null, the entry is ignored.
headers:
- name: api-key
value: "1234"
# Configure headers. Entries have lower priority than entries from .headers.
# The value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.
# If omitted or null, no headers are added.
headers_list: "api-key=1234"
# Configure compression. Values include: gzip, none. Implementations may support other compression algorithms.
# If omitted or null, none is used.
compression: gzip
# Configure max time (in milliseconds) to wait for each export.
# If omitted or null, 10000 is used.
timeout: 10000
# Configure client transport security for the exporter's connection. Only applicable when .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure.
# If omitted or null, false is used.
insecure: false
- # Configure a simple log record processor.
Expand Down Expand Up @@ -145,12 +177,10 @@ meter_provider:
timeout: 30000
# Configure exporter.
exporter:
# Configure exporter to be OTLP.
otlp:
# Configure protocol. Values include: http/protobuf, http/json, grpc.
protocol: http/protobuf
# Configure endpoint.
# If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317).
# Configure exporter to be OTLP with HTTP transport.
otlp_http:
# Configure endpoint, including the metric specific path.
# If omitted or null, http://localhost:4318/v1/metrics is used.
endpoint: http://localhost:4318/v1/metrics
# Configure certificate. Absolute path to certificate file.
# If omitted or null, system default certificate verification is used for secure connections.
Expand All @@ -176,7 +206,49 @@ meter_provider:
# Configure max time (in milliseconds) to wait for each export.
# If omitted or null, 10000 is used.
timeout: 10000
# Configure client transport security for the exporter's connection. Only applicable when .protocol is grpc and .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure.
# Configure the encoding used for messages. Values include: protobuf, json. Implementations may not support json.
# If omitted or null, protobuf is used.
encoding: protobuf
# Configure temporality preference. Values include: cumulative, delta, low_memory. For behavior of values, see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/otlp.md.
# If omitted or null, cumulative is used.
temporality_preference: delta
# Configure default histogram aggregation. Values include: explicit_bucket_histogram, base2_exponential_bucket_histogram. For behavior of values, see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/otlp.md.
# If omitted or null, explicit_bucket_histogram is used.
default_histogram_aggregation: base2_exponential_bucket_histogram
- # Configure a periodic metric reader.
periodic:
# Configure exporter.
exporter:
# Configure exporter to be OTLP with gRPC transport.
otlp_grpc:
# Configure endpoint.
# If omitted or null, http://localhost:4317 is used.
endpoint: http://localhost:4317
# Configure certificate. Absolute path to certificate file.
# If omitted or null, system default certificate verification is used for secure connections.
certificate: /app/cert.pem
# Configure mTLS private client key. Absolute path to client key in PEM format. If set, .client_certificate must also be set.
# If omitted or null, mTLS is not used.
client_key: /app/cert.pem
# Configure mTLS client certificate. Absolute path to certificate file. If set, .client_key must also be set.
# If omitted or null, mTLS is not used.
client_certificate: /app/cert.pem
# Configure headers. Entries have higher priority than entries from .headers_list.
# If an entry's .value is null, the entry is ignored.
headers:
- name: api-key
value: "1234"
# Configure headers. Entries have lower priority than entries from .headers.
# The value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.
# If omitted or null, no headers are added.
headers_list: "api-key=1234"
# Configure compression. Values include: gzip, none. Implementations may support other compression algorithms.
# If omitted or null, none is used.
compression: gzip
# Configure max time (in milliseconds) to wait for each export.
# If omitted or null, 10000 is used.
timeout: 10000
# Configure client transport security for the exporter's connection. Only applicable when .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure.
# If omitted or null, false is used.
insecure: false
# Configure temporality preference. Values include: cumulative, delta, low_memory. For behavior of values, see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/otlp.md.
Expand All @@ -185,10 +257,6 @@ meter_provider:
# Configure default histogram aggregation. Values include: explicit_bucket_histogram, base2_exponential_bucket_histogram. For behavior of values, see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/otlp.md.
# If omitted or null, explicit_bucket_histogram is used.
default_histogram_aggregation: base2_exponential_bucket_histogram
# Configure metric producers.
producers:
- # Configure metric producer to be prometheus.
prometheus:
- # Configure a periodic metric reader.
periodic:
# Configure exporter.
Expand Down Expand Up @@ -293,12 +361,10 @@ tracer_provider:
max_export_batch_size: 512
# Configure exporter.
exporter:
# Configure exporter to be OTLP.
otlp:
# Configure protocol. Values include: http/protobuf, http/json, grpc.
protocol: http/protobuf
# Configure endpoint.
# If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317).
# Configure exporter to be OTLP with HTTP transport.
otlp_http:
# Configure endpoint, including the trace specific path.
# If omitted or null, http://localhost:4318/v1/traces is used.
endpoint: http://localhost:4318/v1/traces
# Configure certificate. Absolute path to certificate file.
# If omitted or null, system default certificate verification is used for secure connections.
Expand All @@ -324,7 +390,43 @@ tracer_provider:
# Configure max time (in milliseconds) to wait for each export.
# If omitted or null, 10000 is used.
timeout: 10000
# Configure client transport security for the exporter's connection. Only applicable when .protocol is grpc and .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure.
# Configure the encoding used for messages. Values include: protobuf, json. Implementations may not support json.
# If omitted or null, protobuf is used.
encoding: protobuf
- # Configure a batch span processor.
batch:
# Configure exporter.
exporter:
# Configure exporter to be OTLP with gRPC transport.
otlp_grpc:
# Configure endpoint.
# If omitted or null, http://localhost:4317 is used.
endpoint: http://localhost:4317
# Configure certificate. Absolute path to certificate file.
# If omitted or null, system default certificate verification is used for secure connections.
certificate: /app/cert.pem
# Configure mTLS private client key. Absolute path to client key in PEM format. If set, .client_certificate must also be set.
# If omitted or null, mTLS is not used.
client_key: /app/cert.pem
# Configure mTLS client certificate. Absolute path to certificate file. If set, .client_key must also be set.
# If omitted or null, mTLS is not used.
client_certificate: /app/cert.pem
# Configure headers. Entries have higher priority than entries from .headers_list.
# If an entry's .value is null, the entry is ignored.
headers:
- name: api-key
value: "1234"
# Configure headers. Entries have lower priority than entries from .headers.
# The value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS. See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options for details.
# If omitted or null, no headers are added.
headers_list: "api-key=1234"
# Configure compression. Values include: gzip, none. Implementations may support other compression algorithms.
# If omitted or null, none is used.
compression: gzip
# Configure max time (in milliseconds) to wait for each export.
# If omitted or null, 10000 is used.
timeout: 10000
# Configure client transport security for the exporter's connection. Only applicable when .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure.
# If omitted or null, false is used.
insecure: false
- # Configure a batch span processor.
Expand Down
28 changes: 10 additions & 18 deletions examples/sdk-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,10 @@ tracer_provider:
max_export_batch_size: 512
# Configure exporter.
exporter:
# Configure exporter to be OTLP.
otlp:
# Configure protocol. Values include: http/protobuf, http/json, grpc.
protocol: http/protobuf
# Configure endpoint.
# If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317).
# Configure exporter to be OTLP with HTTP transport.
otlp_http:
# Configure endpoint, including the trace specific path.
# If omitted or null, http://localhost:4318/v1/traces is used.
endpoint: http://localhost:4318/v1/traces
# Configure certificate. Absolute path to certificate file.
# If omitted or null, system default certificate verification is used for secure connections.
Expand Down Expand Up @@ -145,12 +143,10 @@ meter_provider:
timeout: 30000
# Configure exporter.
exporter:
# Configure exporter to be OTLP.
otlp:
# Configure protocol. Values include: http/protobuf, http/json, grpc.
protocol: http/protobuf
# Configure endpoint.
# If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317).
# Configure exporter to be OTLP with HTTP transport.
otlp_http:
# Configure endpoint, including the metric specific path.
# If omitted or null, http://localhost:4318/v1/metrics is used.
endpoint: http://localhost:4318/v1/metrics
# Configure certificate. Absolute path to certificate file.
# If omitted or null, system default certificate verification is used for secure connections.
Expand Down Expand Up @@ -200,12 +196,8 @@ logger_provider:
max_export_batch_size: 512
# Configure exporter.
exporter:
# Configure exporter to be OTLP.
otlp:
# Configure protocol. Values include: http/protobuf, http/json, grpc.
protocol: http/protobuf
# Configure endpoint.
# If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317).
# Configure exporter to be OTLP with HTTP transport.
otlp_http:
endpoint: http://localhost:4318/v1/logs
# Configure certificate. Absolute path to certificate file.
# If omitted or null, system default certificate verification is used for secure connections.
Expand Down
30 changes: 11 additions & 19 deletions examples/sdk-migration-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# - OTEL_TRACES_EXPORTER
# - OTEL_METRICS_EXPORTER
# - OTEL_LOGS_EXPORTER
# - OTEL_EXPORTER_OTLP_PROTOCOL
# - OTEL_EXPORTER_OTLP_PROTOCOL, OTEL_EXPORTER_OTLP_{SIGNAL}_PROTOCOL
# - OTEL_EXPORTER_OTLP_ENDPOINT
# - OTEL_EXPORTER_OTLP_INSECURE, OTEL_EXPORTER_OTLP_{SIGNAL}_INSECURE
# - OTEL_EXPORTER_OTLP_CERTIFICATE
Expand Down Expand Up @@ -88,12 +88,10 @@ tracer_provider:
max_export_batch_size: ${OTEL_BSP_MAX_EXPORT_BATCH_SIZE:-512}
# Configure exporter.
exporter:
# Configure exporter to be OTLP.
otlp:
# Configure protocol. Values include: http/protobuf, http/json, grpc.
protocol: ${OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:-http/protobuf}
# Configure endpoint.
# If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317).
# Configure exporter to be OTLP with HTTP transport.
otlp_http:
# Configure endpoint, including the trace specific path.
# If omitted or null, http://localhost:4318/v1/traces is used.
endpoint: ${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-http://localhost:4318/v1/traces}
# Configure certificate. Absolute path to certificate file.
# If omitted or null, system default certificate verification is used for secure connections.
Expand Down Expand Up @@ -184,12 +182,10 @@ meter_provider:
timeout: ${OTEL_METRIC_EXPORT_TIMEOUT:-30000}
# Configure exporter.
exporter:
# Configure exporter to be OTLP.
otlp:
# Configure protocol. Values include: http/protobuf, http/json, grpc.
protocol: ${OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:-http/protobuf}
# Configure endpoint.
# If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317).
# Configure exporter to be OTLP with HTTP transport.
otlp_http:
# Configure endpoint, including the metric specific path.
# If omitted or null, http://localhost:4318/v1/metrics is used.
endpoint: ${OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:-http://localhost:4318/v1/metrics}
# Configure certificate. Absolute path to certificate file.
# If omitted or null, system default certificate verification is used for secure connections.
Expand Down Expand Up @@ -243,12 +239,8 @@ logger_provider:
max_export_batch_size: ${OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:-512}
# Configure exporter.
exporter:
# Configure exporter to be OTLP.
otlp:
# Configure protocol. Values include: http/protobuf, http/json, grpc.
protocol: ${OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:-http/protobuf}
# Configure endpoint.
# If .protocol is http/protobuf or http/json, the signal specific path must be included (i.e. http://localhost:4318/v1/{signal}). If .protocol is grpc, a path should not be included (i.e. http://localhost:4317).
# Configure exporter to be OTLP with HTTP transport.
otlp_http:
endpoint: ${OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:-http://localhost:4318/v1/logs}
# Configure certificate. Absolute path to certificate file.
# If omitted or null, system default certificate verification is used for secure connections.
Expand Down
Loading
Loading