-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[receiver/vcenter] Fix multi cluster deployment resource attributes (#…
…31113) **Description:** First pass at better contextualizing VMs in a multicluster deployment. ## The Problem For multicluster deployments the original scraper code incorrectly interpreted assumptions on VM ownership belonging to multiple clusters. ## The Solution The VM folder in a datacenter is completely separated from a cluster. Because of this we have to determine the VM's host system or resource polo in order to appropriate set the `vcenter.cluster.name` appropriately. ## Things that have changed - ClusterComputes are now retrieved as a superset Computes - For the resource attribute `vcenter.cluster.name` to show up, the inventory type must match the string "ClusterComputeResource" - The receiver now maintains a dynamic map of vm Managed Object Reference Value to compute name ## Customer impacts - VM metrics will more appropriately set the `vcenter.cluster.name` resource attribute in multi-cluster environments. This resource attribute will not be emitted for VMs on a runtime hosts outside of a cluster. - VM metrics will now emit with `vcenter.resource_pool.name` and `vcenter.resource_pool.inventory_path` when the VM is a member of one. **Link to tracking Issue:** Resolves #30879 **Testing:** **Documentation:** <Describe the documentation added.>
- Loading branch information
Showing
9 changed files
with
508 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# 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. filelogreceiver) | ||
component: vcenterreceiver | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Fixed the resource attribute model to more accurately support multi-cluster deployments | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [30879] | ||
|
||
# (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: | | ||
For more information on impacts please refer https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31113. The main impacts are that | ||
the `vcenter.resource_pool.name`, `vcenter.resource_pool.inventory_path`, and `vcenter.cluster.name` are reported with more accuracy on VM metrics. | ||
# 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: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
receiver/vcenterreceiver/internal/mockserver/responses/resource-pool-single.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" | ||
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<soapenv:Body> | ||
<RetrievePropertiesResponse xmlns="urn:vim25"> | ||
<returnval> | ||
<obj type="ResourcePool">resgroup-9</obj> | ||
<propSet> | ||
<name>owner</name> | ||
<val type="ClusterComputeResource" xsi:type="ManagedObjectReference">domain-c8</val> | ||
</propSet> | ||
</returnval> | ||
</RetrievePropertiesResponse> | ||
</soapenv:Body> | ||
</soapenv:Envelope> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.