Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k8sattributes processor - Allow metadata extractions to be null #14452

Closed
clheikes opened this issue Sep 22, 2022 · 9 comments · Fixed by #27185
Closed

k8sattributes processor - Allow metadata extractions to be null #14452

clheikes opened this issue Sep 22, 2022 · 9 comments · Fixed by #27185
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed processor/k8sattributes k8s Attributes processor

Comments

@clheikes
Copy link

clheikes commented Sep 22, 2022

Is your feature request related to a problem? Please describe.

I'd like to extract annotations and not be required to extract metadata fields as well.

    processors:
      k8sattributes/metrics:
        extract:
          annotations:
          - from: namespace
            key: splunk.com/metrics-index
            tag_name: com.splunk.index
          - from: pod
            key: splunk.com/metrics-index
            tag_name: com.splunk.index
          metadata: [k8s.pod.name] 

Describe the solution you'd like

Allow me to set metadata: null or something similar

Describe alternatives you've considered

As a workaround I'm setting metadata to a field that my pod assocation rule is using

Additional context

@clheikes clheikes added enhancement New feature or request needs triage New item requiring triage labels Sep 22, 2022
@codeboten codeboten added processor/k8sattributes k8s Attributes processor and removed needs triage New item requiring triage labels Sep 23, 2022
@github-actions
Copy link
Contributor

Pinging code owners: @owais @dmitryax. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@mcdoker18
Copy link
Contributor

mcdoker18 commented Sep 27, 2022

I am going to fix this bug after merging the PR.

setting of metadata to null or empty value in the config will cleanup default metadata values.

@github-actions
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2023

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Apr 3, 2023
@dmitryax dmitryax added help wanted Extra attention is needed good first issue Good for newcomers and removed Stale labels Apr 3, 2023
@dmitryax
Copy link
Member

dmitryax commented Apr 3, 2023

Requires open-telemetry/opentelemetry-collector#4001 to be resolved first

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Aug 7, 2023
@dmitryax dmitryax removed the Stale label Aug 7, 2023
@fatsheep9146 fatsheep9146 self-assigned this Sep 11, 2023
@fatsheep9146
Copy link
Contributor

Requires open-telemetry/opentelemetry-collector#4001 to be resolved first

open-telemetry/opentelemetry-collector#8017 resolve this problem

@fatsheep9146
Copy link
Contributor

#27005

core will be updated in this pr

dmitryax added a commit that referenced this issue Sep 26, 2023
…#27185)

**Description:** 
Allow metadata extractions to be empty list

After this is merged, user is allow to specify the metadata to be empty list
like following

```
    processors:
      k8sattributes:
        extract:
          annotations:
          - from: pod
            key: workload
            tag_name: k8s.annotations.workload
          labels:
          - from: pod
            key: app
            tag_name: k8s.labels.app
          metadata: []
```

**Link to tracking Issue:** fix #14452 

---------

Signed-off-by: Ziqi Zhao <[email protected]>
Co-authored-by: Dmitrii Anoshin <[email protected]>
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this issue Nov 12, 2023
…open-telemetry#27185)

**Description:** 
Allow metadata extractions to be empty list

After this is merged, user is allow to specify the metadata to be empty list
like following

```
    processors:
      k8sattributes:
        extract:
          annotations:
          - from: pod
            key: workload
            tag_name: k8s.annotations.workload
          labels:
          - from: pod
            key: app
            tag_name: k8s.labels.app
          metadata: []
```

**Link to tracking Issue:** fix open-telemetry#14452 

---------

Signed-off-by: Ziqi Zhao <[email protected]>
Co-authored-by: Dmitrii Anoshin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed processor/k8sattributes k8s Attributes processor
Projects
None yet
5 participants