Commit 2f7c78e
authored
fix npe on some metrics for vcenter vms (open-telemetry#41701)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
I believe that this should be the only nullable field improperly
accessed within this file.
```go
// The ConfigInfo data object type encapsulates the configuration settings and
// virtual hardware for a virtual machine.
//
// This type holds all the information
// that is present in the .vmx configuration file for the virtual machine.
type VirtualMachineConfigInfo struct {
```
I'm thinking users may have created a machine and attached the vmdk to
it and thats may be the potential cause?
Either way this should resolve the NPE and shouldn't crash the collector
when we encounter these.
<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#41018
<!--Describe what testing was performed and which tests were added.-->
#### Testing
<!--Describe the documentation added.-->
#### Documentation
Changelog1 parent 7589c18 commit 2f7c78e
2 files changed
+28
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
0 commit comments