Open zarbis opened 1 week ago
Pinging code owners:
processor/k8sattributes: @dmitryax @fatsheep9146 @TylerHelmuth
See Adding Labels via Comments if you do not have permissions to add labels yourself.
This feels correct. The digest can instead be captured in container.image.id
or container.image.repo_digests
: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/container.md
@TylerHelmuth indeed, you will get full content of ImageID
from registry to digest in container.image.repo_digests
, but image.name
will still be incorrectly capturing @sha256
and image.tag
would incorrectly be digest, regardless of capturing image.repo_digests
.
Capturing image.repo_digests
doesn't solve incorrect captures for name and tag.
@zarbis I meant fixing the captured fields to
container.image.name: alpine
container.image.tag: 3.19
image.repo_digests: sha256:ae65dbf8749a7d4527648ccee1fa3deb6bfcae34cbc30fc67aa45c44dcaa90ee
feels the most right
Component(s)
processor/k8sattributes
What happened?
Description
For better integrity guarantees we've started using
name:tag@digest
image reference format (e.g.alpine:3.19@sha256:ae65dbf8749a7d4527648ccee1fa3deb6bfcae34cbc30fc67aa45c44dcaa90ee
).It doesn't seem to be part of OCI image spec, but many projects use it (for example Karpenter).
Steps to Reproduce
alpine:3.19@sha256:ae65dbf8749a7d4527648ccee1fa3deb6bfcae34cbc30fc67aa45c44dcaa90ee
k8sattributes
processor:Expected Result
Actual Result
So basically split happens on last colon, not the first one.
Collector version
0.107.0
Environment information
Environment
K8s: 1.29
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response