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

[receiver/vcenter] vcenter.cluster.name Resource Attribute Does Not Make Sense for Datastore Resource #32674

Closed
StefanKurek opened this issue Apr 24, 2024 · 4 comments
Labels
bug Something isn't working needs triage New item requiring triage receiver/vcenter

Comments

@StefanKurek
Copy link
Contributor

Component(s)

receiver/vcenter

What happened?

Description

Datastores do not “belong” to Clusters (especially not a single Cluster). Datastores exist on the Datacenter level. But Hosts & Clusters (more specifically the Hosts within Clusters) make use of them.

Currently, there is odd behavior where Datastore metrics are repeated for each cluster (although the metric datapoint values are all the same, just with a different cluster attribute on the containing Resource). Datastore metrics are also repeated for standalone Hosts, but no matter how many of these Hosts exist, there will only be one set of metrics (because the containing Resource will not have a cluster attribute).

Steps to Reproduce

Collect against any vCenter environment with Datastores and some mix of multiple Clusters/Standalone Hosts.

Expected Result

A single set of metrics would come back for each Datastore under a Resource that represents that Datastore.

Actual Result

For each Datastore, Datastore Resources are created for each Cluster with repeated metrics. An additional Datastore Resource will also be created for any amount of standalone Hosts with repeated metrics.

Collector version

v1.5.0/v0.98.0

Environment information

No response

OpenTelemetry Collector configuration

extensions:
  basicauth/prom:
    client_auth:
      username: [PROMUSER]
      password: [PROMPASS]

exporters:
  prometheusremotewrite:
    endpoint: [PROMENDPOINT]
    auth:
      authenticator: basicauth/prom
    resource_to_telemetry_conversion:
      enabled: true # Convert resource attributes to metric labels

processors:
  batch:
    # https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor

receivers:
  vcenter:
    endpoint: https://[VCENTERHOST]
    username: [VCENTERUSER]
    password: [VCENTERPASS]
    tls:
      insecure: true
    collection_interval: 1m
    initial_delay: 1s

service:
  extensions: [basicauth/prom]
  pipelines:
    metrics:
      receivers: [vcenter]
      processors: [batch]
      exporters: [prometheusremotewrite]

Log output

No response

Additional context

No response

@StefanKurek StefanKurek added bug Something isn't working needs triage New item requiring triage labels Apr 24, 2024
Copy link
Contributor

Pinging code owners:

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

@StefanKurek
Copy link
Contributor Author

StefanKurek commented Apr 24, 2024

@djaglowski I think there are a couple of options.

  1. Remove the vcenter.cluster.name attribute completely from the Datastore resources
  2. Add a new vcenter.cluster.names attribute to Datastore resources which would contain a list of all clusters that make use of this Datastore (for relational information). We could also choose to do the same thing with a vcenter.hosts.names attribute.

Neither of these seems ideal, but I think (# 1) would be especially unfortunate as we would lose out on this information.

@schmikei
Copy link
Contributor

I think between these two solutions, I'd have a preference of Remove the vcenter.cluster.name attribute completely from the Datastore resources

I'm of the opinion that with #32531 being in I have less of a concern around uniquely identifying datastores. And that this probably more accurately defines a datastore.

@djaglowski
Copy link
Member

I agree removing the attribute makes the most sense here. Since it'll be a breaking change, we should first add a warning to be released in the next version, then remove in the following version.

djaglowski pushed a commit that referenced this issue Apr 30, 2024
…or Datastore Resource (#32719)

**Description:** <Describe what has changed.>
Adds warning log about the `vcenter.cluster.name` resource attribute
from all Datastore resources.

This
[PR](#32687)
follows up after a v0.100.0 release, and will fully resolve the problem
for the v.0.101.0 release

**Link to tracking Issue:** <Issue number if applicable>
#32674 

**Testing:** <Describe what testing was performed and which tests were
added.>
Manual Testing for new one time Log

**Documentation:** <Describe the documentation added.>
None needed
djaglowski added a commit that referenced this issue May 8, 2024
…source (#32687)

**Description:** <Describe what has changed.>
Removed the `vcenter.cluster.name` resource attribute from all Datastore
resources.

**Link to tracking Issue:** <Issue number if applicable>
#32674 

**Testing:** <Describe what testing was performed and which tests were
added.>
Unit/integration tests updated and tested. Local environment tested.

**Documentation:** <Describe the documentation added.>
New documentation generated based on the metadata.

---------

Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com>
Co-authored-by: Curtis Robert <crobert@splunk.com>
rimitchell pushed a commit to rimitchell/opentelemetry-collector-contrib that referenced this issue May 8, 2024
…or Datastore Resource (open-telemetry#32719)

**Description:** <Describe what has changed.>
Adds warning log about the `vcenter.cluster.name` resource attribute
from all Datastore resources.

This
[PR](open-telemetry#32687)
follows up after a v0.100.0 release, and will fully resolve the problem
for the v.0.101.0 release

**Link to tracking Issue:** <Issue number if applicable>
open-telemetry#32674 

**Testing:** <Describe what testing was performed and which tests were
added.>
Manual Testing for new one time Log

**Documentation:** <Describe the documentation added.>
None needed
rimitchell pushed a commit to rimitchell/opentelemetry-collector-contrib that referenced this issue May 8, 2024
…source (open-telemetry#32687)

**Description:** <Describe what has changed.>
Removed the `vcenter.cluster.name` resource attribute from all Datastore
resources.

**Link to tracking Issue:** <Issue number if applicable>
open-telemetry#32674 

**Testing:** <Describe what testing was performed and which tests were
added.>
Unit/integration tests updated and tested. Local environment tested.

**Documentation:** <Describe the documentation added.>
New documentation generated based on the metadata.

---------

Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com>
Co-authored-by: Curtis Robert <crobert@splunk.com>
jlg-io pushed a commit to jlg-io/opentelemetry-collector-contrib that referenced this issue May 14, 2024
…or Datastore Resource (open-telemetry#32719)

**Description:** <Describe what has changed.>
Adds warning log about the `vcenter.cluster.name` resource attribute
from all Datastore resources.

This
[PR](open-telemetry#32687)
follows up after a v0.100.0 release, and will fully resolve the problem
for the v.0.101.0 release

**Link to tracking Issue:** <Issue number if applicable>
open-telemetry#32674 

**Testing:** <Describe what testing was performed and which tests were
added.>
Manual Testing for new one time Log

**Documentation:** <Describe the documentation added.>
None needed
jlg-io pushed a commit to jlg-io/opentelemetry-collector-contrib that referenced this issue May 14, 2024
…source (open-telemetry#32687)

**Description:** <Describe what has changed.>
Removed the `vcenter.cluster.name` resource attribute from all Datastore
resources.

**Link to tracking Issue:** <Issue number if applicable>
open-telemetry#32674 

**Testing:** <Describe what testing was performed and which tests were
added.>
Unit/integration tests updated and tested. Local environment tested.

**Documentation:** <Describe the documentation added.>
New documentation generated based on the metadata.

---------

Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com>
Co-authored-by: Curtis Robert <crobert@splunk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New item requiring triage receiver/vcenter
Projects
None yet
Development

No branches or pull requests

3 participants