Skip to content

Instantly share code, notes, and snippets.

@benbhall
Last active February 16, 2023 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benbhall/04b3ec79b6a1934be586efbf06a0ef21 to your computer and use it in GitHub Desktop.
Save benbhall/04b3ec79b6a1934be586efbf06a0ef21 to your computer and use it in GitHub Desktop.
OTEL Collector Demo
receivers:
otlp:
protocols:
grpc:
http:
filelog:
include: [ /var/log/myservice/*.json ]
operators:
- type: json_parser
timestamp:
parse_from: attributes.time
layout: '%Y-%m-%d %H:%M:%S'
exporters:
elasticsearch/trace:
endpoints: [https://elastic.example.com:9200]
traces_index: trace_index
elasticsearch/log:
endpoints: [http://localhost:9200]
logs_index: my_log_index
prometheus:
endpoint: "1.2.3.4:1234"
file/rotation_with_default_settings:
path: ./foo
rotation:
service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlp, elasticsearch/trace]
logs:
receivers: [otlp]
exporters: [otlp, elasticsearch/log, file/rotation_with_default_settings]
metrics:
receivers: [otlp]
exporters: [otlp, prometheus]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment