diff --git a/.chloggen/k8sattributes-semconv-gates.yaml b/.chloggen/k8sattributes-semconv-gates.yaml new file mode 100644 index 0000000000000..255112b034294 --- /dev/null +++ b/.chloggen/k8sattributes-semconv-gates.yaml @@ -0,0 +1,33 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog) +component: processor/k8sattributes + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Introduce semantic conventions compliant feature gate pair for k8sattributes processor + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [44693] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + - Added `processor.k8sattributes.EmitV1K8sConventions` feature gate to enable stable semantic convention attributes (singular form: `k8s..label.` and `k8s..annotation.`) + - Added `processor.k8sattributes.DontEmitV0K8sConventions` feature gate to disable legacy non-compliant attributes (plural form: `k8s..labels.` and `k8s..annotations.`) + - Both feature gates are in `alpha` stage and disabled by default + - The processor now validates that legacy attributes cannot be disabled without enabling stable attributes + - Deprecated `k8sattr.labelsAnnotationsSingular.allow` feature gate in favor of the new semconv-compliant gates (will be removed in v0.150.0) + - During migration period, both legacy and stable attributes can coexist when `EmitV1K8sConventions` is enabled but `DontEmitV0K8sConventions` is not + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/processor/k8sattributesprocessor/config.go b/processor/k8sattributesprocessor/config.go index e3a02f2da7b52..79c6b77f05f51 100644 --- a/processor/k8sattributesprocessor/config.go +++ b/processor/k8sattributesprocessor/config.go @@ -175,8 +175,8 @@ type ExtractConfig struct { type FieldExtractConfig struct { // TagName represents the name of the resource attribute that will be added to logs, metrics or spans. // When not specified, a default tag name will be used of the format: - // - k8s.pod.annotations. (or k8s.pod.annotation. when k8sattr.labelsAnnotationsSingular.allow is enabled) - // - k8s.pod.labels.