File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,16 @@ processors:
2020 limit_mib : 512
2121 spike_limit_mib : 128
2222
23+ # Add resource attributes to metrics for Bedrock users
24+ # Only adds if not already present (avoids duplicates)
25+ transform :
26+ metric_statements :
27+ - context : datapoint
28+ statements :
29+ - set(attributes["provider"], resource.attributes["provider"]) where attributes["provider"] == nil and resource.attributes["provider"] != nil
30+ - set(attributes["team"], resource.attributes["team"]) where attributes["team"] == nil and resource.attributes["team"] != nil
31+ - set(attributes["user_email"], resource.attributes["user_email"]) where attributes["user_email"] == nil and resource.attributes["user_email"] != nil
32+
2333exporters :
2434 prometheus :
2535 endpoint : " 0.0.0.0:8889"
@@ -48,7 +58,7 @@ service:
4858 pipelines :
4959 metrics :
5060 receivers : [otlp]
51- processors : [memory_limiter, batch]
61+ processors : [memory_limiter, transform, batch]
5262 exporters : [prometheus, debug]
5363
5464 logs :
You can’t perform that action at this time.
0 commit comments