Commit 4b8f95c
instrumentation config: return empty object when not set (#4817)
Fixes open-telemetry/opentelemetry-java#7958
## Changes
While working on Java, it has turned out to be more convenient to work
with empty config objects rather than null/nil.
- null requires an explicit if, making the code more verbose
- it doesn't matter if the `.instrumentation` is missing or is empty,
which is a different question than "is declarative config used")
* [x] Related issues:
open-telemetry/opentelemetry-java#7927 (comment)
* [ ] Related [OTEP(s)](https://github.com/open-telemetry/oteps) #
* [x] Links to the prototypes (when adding or changing features):
open-telemetry/opentelemetry-java#7954
* [ ]
[`CHANGELOG.md`](https://github.com/open-telemetry/opentelemetry-specification/blob/main/CHANGELOG.md)
file updated for non-trivial changes
* [ ] [Spec compliance
matrix](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix/template.yaml)
updated if necessary
---------
Co-authored-by: Trask Stalnaker <[email protected]>
Co-authored-by: Jack Berg <[email protected]>
Co-authored-by: Carlos Alberto Cortez <[email protected]>1 parent e0a5864 commit 4b8f95c
2 files changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
| 63 | + | |
| 64 | + | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
| |||
0 commit comments