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

add advance conf for otel-collector #212

Merged
merged 13 commits into from
Aug 4, 2022
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,5 @@ significant modifications will be credited to OpenTelemetry Authors.
([#253](https://github.com/open-telemetry/opentelemetry-demo/pull/253))
* Added explicit support for Kubernetes.
([#255](https://github.com/open-telemetry/opentelemetry-demo/pull/255))
* Added spanmetrics processor to otelcol
([#212]((https://github.com/open-telemetry/opentelemetry-demo/pull/212)))
Frapschen marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:

# Collector
otelcol:
image: otel/opentelemetry-collector:0.56.0
image: otel/opentelemetry-collector-contrib:0.56.0
container_name: otel-col
command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-extras.yml" ]
volumes:
Expand Down
11 changes: 10 additions & 1 deletion src/otelcollector/otelcol-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ receivers:
protocols:
grpc:
http:
otlp/spanmetrics:
protocols:
grpc:
endpoint: "localhost:65535"

exporters:
jaeger:
Expand All @@ -16,14 +20,19 @@ exporters:

processors:
batch:
spanmetrics:
metrics_exporter: prometheus

service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
processors: [spanmetrics, batch]
exporters: [logging, jaeger]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [prometheus, logging]
metrics/spanmetrics:
receivers: [ otlp/spanmetrics ]
exporters: [ prometheus, logging ]