Skip to content

Commit

Permalink
Extract container.image.tag attribute from container.image.name
Browse files Browse the repository at this point in the history
Update k8sClusterReceiver component to export `container.image.tag` attribute from `container.image.name` according to OpenTelemetry semantic conventions https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/resource/semantic_conventions/container.md

This can be removed once this issue open-telemetry/opentelemetry-collector-contrib#6314 is resolved
  • Loading branch information
dmitryax committed Nov 15, 2021
1 parent 07612d8 commit e2c73d0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

- Field name compatibility for SCK (#258)

### Changed

- Extract `container.image.tag` attribute from `container.image.name` (#285)

### Removed

- Busybox image dependency (#275)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,21 @@ processors:
key: {{ .name }}
value: {{ .value }}
{{- end }}
# Extract "container.image.tag" attribute from "container.image.name" here until k8scluster
# receiver does it natively.
- key: container.image.name
pattern: ^(?P<container_image_name>[^\:]+)(?:\:(?P<container_image_tag>.*))?
action: extract
- key: container.image.name
from_attribute: container_image_name
action: upsert
- key: container_image_name
action: delete
- key: container.image.tag
from_attribute: container_image_tag
action: upsert
- key: container_image_tag
action: delete

exporters:
{{- if eq (include "splunk-otel-collector.o11yMetricsEnabled" $) "true" }}
Expand Down

0 comments on commit e2c73d0

Please sign in to comment.