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

[cmd/mdatagen] Add warnings in resource_attributes section #19174

Closed
Tracked by #7301
dmitryax opened this issue Mar 1, 2023 · 8 comments
Closed
Tracked by #7301

[cmd/mdatagen] Add warnings in resource_attributes section #19174

dmitryax opened this issue Mar 1, 2023 · 8 comments
Assignees

Comments

@dmitryax
Copy link
Member

dmitryax commented Mar 1, 2023

Author of metadata.yaml should be able to specify the same warnings in resource_attributes section as available in the metrics section. This is needed to provide a graceful way to handle changes to default/optional resource_attributes.

@dmitryax dmitryax changed the title [dmd/mdatagen] Add warnings in resource_attributes section [cmd/mdatagen] Add warnings in resource_attributes section Mar 1, 2023
@atoulme atoulme added the cmd/mdatagen mdatagen command label Mar 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2023

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

@abhide
Copy link
Member

abhide commented Mar 29, 2023

@dmitryax I would like to work on this issue. Can you please assign it to me?

@dmitryax
Copy link
Member Author

Thanks, @abhide . Assigned to you

@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

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.

@povilasv
Copy link
Contributor

povilasv commented Sep 28, 2023

Started work on a PR #27257

@dmitryax would appreciate if you could take a look / give early feedback 🙇

I'm not sure what to do about this #27257 (comment) part did some manual tests of this PR and it seems to work

dmitryax pushed a commit that referenced this issue Oct 10, 2023
**Description:**  allow adding resource_attribute warnings

**Link to tracking Issue:**
#19174

**Testing:**
- Generated unit tests
- Tested manually with some changes to k8sclusterreceiver:

```
  k8s.kubelet.version:
    description: The version of Kubelet running on the node.
    type: string
    enabled: false
    warnings:
      if_configured: This resource_attribute is deprecated and will be removed soon.

  opencensus.resourcetype:
    description: The OpenCensus resource type.
    type: string
    enabled: true
    warnings:
      if_enabled: This resource_attribute is deprecated and will be removed soon.
```

Gives the following output:
```
{"level":"warn","ts":1695985300.0413303,"caller":"metadata/generated_metrics.go:2201","msg":"[WARNING] `k8s.kubelet.version` should not be configured: This resource_attribute is deprecated and will be removed soon.","kind":"receiver","name":"k8s_cluster","data_type":"metrics"}     
{"level":"warn","ts":1695985300.041354,"caller":"metadata/generated_metrics.go:2207","msg":"[WARNING] `opencensus.resourcetype` should not be enabled: This resource_attribute is deprecated and will be removed soon.","kind":"receiver","name":"k8s_cluster","data_type":"metrics"}
 ```
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this issue Nov 12, 2023
…7257)

**Description:**  allow adding resource_attribute warnings

**Link to tracking Issue:**
open-telemetry#19174

**Testing:**
- Generated unit tests
- Tested manually with some changes to k8sclusterreceiver:

```
  k8s.kubelet.version:
    description: The version of Kubelet running on the node.
    type: string
    enabled: false
    warnings:
      if_configured: This resource_attribute is deprecated and will be removed soon.

  opencensus.resourcetype:
    description: The OpenCensus resource type.
    type: string
    enabled: true
    warnings:
      if_enabled: This resource_attribute is deprecated and will be removed soon.
```

Gives the following output:
```
{"level":"warn","ts":1695985300.0413303,"caller":"metadata/generated_metrics.go:2201","msg":"[WARNING] `k8s.kubelet.version` should not be configured: This resource_attribute is deprecated and will be removed soon.","kind":"receiver","name":"k8s_cluster","data_type":"metrics"}     
{"level":"warn","ts":1695985300.041354,"caller":"metadata/generated_metrics.go:2207","msg":"[WARNING] `opencensus.resourcetype` should not be enabled: This resource_attribute is deprecated and will be removed soon.","kind":"receiver","name":"k8s_cluster","data_type":"metrics"}
 ```
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 github-actions bot added the Stale label Nov 29, 2023
Copy link
Contributor

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants