forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[receiver/vcenterreceiver] Optimize vCenter VM network calls (open-te…
…lemetry#32201) **Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> Changes the method for collecting VMs used by the `vccenterreceiver` to the more time-efficient `CreateContainerView` method. This is the first step to addressing the issue linked below. **Link to tracking Issue:** open-telemetry#31837 **Testing:** These changes were tested on an environment with 200+ virtual machines. The original collection time was ~80 seconds. Collection times with these changes are ~40 seconds. **Documentation:** N/A --------- Co-authored-by: Stefan Kurek <[email protected]>
- Loading branch information
1 parent
0ad3cc9
commit 11d2988
Showing
16 changed files
with
307 additions
and
1,578 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,27 @@ | ||
# Use this changelog template to create an entry for release notes. | ||
|
||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: enhancement | ||
|
||
# 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: "Changes process for collecting VMs & VM perf metrics used by the `vccenterreceiver` to be more efficient (one call now for all VMs)" | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [31837] | ||
|
||
# (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: | ||
|
||
# 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: [user] |
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
6 changes: 4 additions & 2 deletions
6
.../mockserver/responses/vm-empty-folder.xml → ...erver/responses/create-container-view.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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
<?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"></RetrievePropertiesResponse> | ||
<CreateContainerViewResponse xmlns="urn:vim25"> | ||
<returnval type="ContainerView">session[5279c748-1a9c-e5f0-cc05-71b15da3a8a6]529d3b1c-0a03-30d0-f0c8-8cae2cc07d25</returnval> | ||
</CreateContainerViewResponse> | ||
</soapenv:Body> | ||
</soapenv:Envelope> | ||
</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
70 changes: 70 additions & 0 deletions
70
receiver/vcenterreceiver/internal/mockserver/responses/vm-default-properties.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,70 @@ | ||
<?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="VirtualMachine">vm-1040</obj> | ||
<propSet> | ||
<name>config.hardware.numCPU</name> | ||
<val xsi:type="xsd:int">4</val> | ||
</propSet> | ||
<propSet> | ||
<name>config.instanceUuid</name> | ||
<val xsi:type="xsd:string">5000bbe0-993e-5813-c56a-198eaa62fb61</val> | ||
</propSet> | ||
<propSet> | ||
<name>resourcePool</name> | ||
<val type="ResourcePool" xsi:type="ManagedObjectReference">resgroup-9</val> | ||
</propSet> | ||
<propSet> | ||
<name>runtime.maxCpuUsage</name> | ||
<val xsi:type="xsd:int">10372</val> | ||
</propSet> | ||
<propSet> | ||
<name>runtime.powerState</name> | ||
<val xsi:type="VirtualMachinePowerState">poweredOn</val> | ||
</propSet> | ||
<propSet> | ||
<name>summary.config.memorySizeMB</name> | ||
<val xsi:type="xsd:int">16384</val> | ||
</propSet> | ||
<propSet> | ||
<name>summary.config.name</name> | ||
<val xsi:type="xsd:string">CentOS 7</val> | ||
</propSet> | ||
<propSet> | ||
<name>summary.quickStats.balloonedMemory</name> | ||
<val xsi:type="xsd:int">0</val> | ||
</propSet> | ||
<propSet> | ||
<name>summary.quickStats.guestMemoryUsage</name> | ||
<val xsi:type="xsd:int">163</val> | ||
</propSet> | ||
<propSet> | ||
<name>summary.quickStats.overallCpuUsage</name> | ||
<val xsi:type="xsd:int">12</val> | ||
</propSet> | ||
<propSet> | ||
<name>summary.quickStats.ssdSwappedMemory</name> | ||
<val xsi:type="xsd:long">0</val> | ||
</propSet> | ||
<propSet> | ||
<name>summary.quickStats.swappedMemory</name> | ||
<val xsi:type="xsd:int">0</val> | ||
</propSet> | ||
<propSet> | ||
<name>summary.runtime.host</name> | ||
<val type="HostSystem" xsi:type="ManagedObjectReference">host-1002</val> | ||
</propSet> | ||
<propSet> | ||
<name>summary.storage.committed</name> | ||
<val xsi:type="xsd:long">16311648256</val> | ||
</propSet> | ||
<propSet> | ||
<name>summary.storage.uncommitted</name> | ||
<val xsi:type="xsd:long">258847277056</val> | ||
</propSet> | ||
</returnval> | ||
</RetrievePropertiesResponse> | ||
</soapenv:Body> | ||
</soapenv:Envelope> |
36 changes: 0 additions & 36 deletions
36
receiver/vcenterreceiver/internal/mockserver/responses/vm-folder-parent.xml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.