Skip to content

Commit 58279c0

Browse files
Merge pull request #231 from Maskoff0/feature-branch
Labels on Metadata are able to identify the workload a series belongs to
2 parents 037845e + 41ddb67 commit 58279c0

7 files changed

Lines changed: 726 additions & 906 deletions

File tree

‎Examples/run-with-docker/docker-compose.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ services:
4949
# - cortexflow
5050

5151
otel-collector:
52-
image: otel/opentelemetry-collector:0.95.0
52+
image: otel/opentelemetry-collector-contrib:0.95.0
5353
container_name: otel-collector
5454
command:
5555
- "--config=/conf/otel-collector-config.yaml"

‎Examples/run-with-docker/otel-collector-config.yaml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ processors:
1111
limit_mib: 1500
1212
spike_limit_mib: 512
1313
check_interval: 5s
14+
transform/identity:
15+
error_mode: ignore
16+
metric_statements:
17+
- context: datapoint
18+
statements:
19+
- set(attributes["container.name"], attributes["k8s.pod.name"])
20+
where attributes["container.name"] == nil and attributes["k8s.pod.name"] != nil
1421

1522
exporters:
1623
logging: {}
@@ -30,5 +37,5 @@ service:
3037
exporters: [logging]
3138
metrics:
3239
receivers: [otlp]
33-
processors: [memory_limiter]
40+
processors: [memory_limiter, transform/identity]
3441
exporters: [logging, prometheus]

‎core/src/testing/otel_agent.yaml‎

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ data:
1717
http:
1818
endpoint: 0.0.0.0:4318
1919
20+
processors:
21+
transform/identity:
22+
error_mode: ignore
23+
metric_statements:
24+
- context: datapoint
25+
statements:
26+
- set(attributes["container.name"], attributes["k8s.pod.name"])
27+
where attributes["container.name"] == nil and attributes["k8s.pod.name"] != nil
28+
2029
exporters:
2130
otlp:
2231
endpoint: ${OTEL_COLLECTOR_SERVICE_HOST}:4317
@@ -38,6 +47,7 @@ data:
3847
exporters: [otlp, logging]
3948
metrics:
4049
receivers: [otlp]
50+
processors: [transform/identity]
4151
exporters: [otlp, prometheus]
4252
4353
---
@@ -64,9 +74,9 @@ spec:
6474
dnsPolicy: ClusterFirstWithHostNet
6575
containers:
6676
- name: otel-agent
67-
image: otel/opentelemetry-collector:0.95.0
77+
image: otel/opentelemetry-collector-contrib:0.95.0
6878
command:
69-
- "/otelcol"
79+
- "/otelcol-contrib"
7080
- "--config=/conf/otel-agent-config.yaml"
7181
resources:
7282
limits:
@@ -123,6 +133,13 @@ data:
123133
limit_mib: 1500
124134
spike_limit_mib: 512
125135
check_interval: 5s
136+
transform/identity:
137+
error_mode: ignore
138+
metric_statements:
139+
- context: datapoint
140+
statements:
141+
- set(attributes["container.name"], attributes["k8s.pod.name"])
142+
where attributes["container.name"] == nil and attributes["k8s.pod.name"] != nil
126143
127144
exporters:
128145
# otlp:
@@ -147,7 +164,7 @@ data:
147164
exporters: [logging]
148165
metrics:
149166
receivers: [otlp]
150-
processors: [memory_limiter]
167+
processors: [memory_limiter, transform/identity]
151168
exporters: [logging,prometheus]
152169
153170
---
@@ -197,9 +214,9 @@ spec:
197214
spec:
198215
containers:
199216
- name: otel-collector
200-
image: otel/opentelemetry-collector:0.95.0
217+
image: otel/opentelemetry-collector-contrib:0.95.0
201218
command:
202-
- "/otelcol"
219+
- "/otelcol-contrib"
203220
- "--config=/conf/otel-collector-config.yaml"
204221
resources:
205222
limits:

0 commit comments

Comments
 (0)