Commit 6f37dec
authored
Add support for deployment.environment.name (#1722)
# Description of the issue
ApplicationSignalsProcessor relies on the resource attribute `deployment.environment` as a customer-provided override for ApplicationSignals `Environment`. However, `deployment.environment` has been deprecated and replaced with `deployment.environment.name` in the upstream.
# Description of changes
In this PR, we are adding support for the new attribute, while maintaining support for the old attribute, since customers may still specify `deployment.environment`, for example, if they are running on older OTEL versions.
Callout: We are no longer getting these attribute names from semconv as:
1. We were relying on go.opentelemetry.io/collector/semconv/v1.22.0, which does not have `deployment.environment.name`
2. https://pkg.go.dev/go.opentelemetry.io/collector/semconv has been deprecated
3. It's replacement, https://pkg.go.dev/go.opentelemetry.io/otel/semconv does not include `deployment.environment.name`: https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-go+deployment.environment.name&type=code
4. Nor does it include `deployment.environment` in the latest releases (1.3x): https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-go+deployment.environment&type=code
So we hardcode these attributes within the processor logic.1 parent 5715f35 commit 6f37dec
File tree
3 files changed
+37
-29
lines changed- plugins/processors/awsapplicationsignals/internal
- attributes
- resolver
3 files changed
+37
-29
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
32 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
Lines changed: 25 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | | - | |
137 | 136 | | |
138 | 137 | | |
| 138 | + | |
| 139 | + | |
139 | 140 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 141 | + | |
148 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
149 | 146 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
156 | 151 | | |
157 | | - | |
| 152 | + | |
158 | 153 | | |
| 154 | + | |
| 155 | + | |
159 | 156 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
165 | 160 | | |
166 | 161 | | |
167 | 162 | | |
168 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
169 | 172 | | |
170 | 173 | | |
171 | 174 | | |
| |||
0 commit comments