Skip to content

Commit

Permalink
double-write metrics to otlphttp exporter and googlemanagedprometheus
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Dec 5, 2024
1 parent a3cabc7 commit 56e1bd8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gcp/opentelemetry-demo-features.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,7 @@ opentelemetry-collector:
traces:
processors: [k8sattributes, memory_limiter, resourcedetection, resource, resource/gcp_project_id, batch]
exporters: [otlphttp/gcp_auth]
metrics/otlp:
processors: [k8sattributes, memory_limiter, filter/currency, resourcedetection, transform/collision, resource, resource/gcp_project_id, transform/metricprefix, batch]
exporters: [otlphttp/gcp_auth]
{{ end }}
6 changes: 6 additions & 0 deletions src/otelcollector/otelcol-config-extras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ processors:
detectors: [gcp]
timeout: 10s

transform/metricprefix:
metric_statements:
- context: metric
statements:
- set(name, Concat(["otlp", name], "."))

transform/collision:
metric_statements:
- context: datapoint
Expand Down

0 comments on commit 56e1bd8

Please sign in to comment.