Skip to content

Instantly share code, notes, and snippets.

@Peder2911
Created February 23, 2023 11:50
Show Gist options
  • Save Peder2911/5f27bdae8b5b6df17fdac58f1d9b84f9 to your computer and use it in GitHub Desktop.
Save Peder2911/5f27bdae8b5b6df17fdac58f1d9b84f9 to your computer and use it in GitHub Desktop.
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
name: otel-collector
spec:
mode: deployment
config: |
receivers:
otlp:
protocols:
http:
grpc:
processors:
exporters:
logging:
service:
pipelines:
traces:
receivers: [otlp]
processors: []
exporters: [logging]
---
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
name: otel-sidecar
spec:
mode: sidecar
config: |
receivers:
otlp:
protocols:
http:
grpc:
processors:
batch:
exporters:
otlphttp:
endpoint: otel-collector-collector:4318
logging:
service:
pipelines:
traces:
receivers: [otlp]
processors: []
exporters: [otlphttp, logging]
---
apiVersion: opentelemetry.io/v1alpha1
kind: Instrumentation
metadata:
name: otel-instrumentation
spec:
exporter:
endpoint: http://localhost:4317
propagators:
- tracecontext
- baggage
- b3
sampler:
type: parentbased_traceidratio
argument: "0.25"
python:
env:
# Required if endpoint is set to 4317.
# Python autoinstrumentation uses http/proto by default
# so data must be sent to 4318 instead of 4137.
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://localhost:4318
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment