Commit 7cd27dd
authored
[Monitor OpenTelemetry Exporter] Add
### Packages impacted by this PR
@azure/monitor-opentelemetry-exporter
### Describe the problem that is addressed by this PR
This pull request improves AKS (Azure Kubernetes Service) detection in
the `monitor-opentelemetry-exporter` package by updating the logic to
recognize AKS environments when the `KUBERNETES_SERVICE_HOST`
environment variable is present. This change helps ensure that the
exporter correctly identifies AKS deployments even if
`AKS_ARM_NAMESPACE_ID` is not set.
**AKS detection improvements:**
* Updated `StatsbeatMetrics#getResourceProvider` in
`statsbeatMetrics.ts` to detect AKS when either `AKS_ARM_NAMESPACE_ID`
or `KUBERNETES_SERVICE_HOST` is defined, and set the resource identifier
accordingly.
* Documented the AKS detection enhancement in the `CHANGELOG.md` for the
upcoming `1.0.0-beta.37` release.
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [x] Added a changelog (if necessary)KUBERNETES_SERVICE_HOST Detection (#36660)1 parent 66dad41 commit 7cd27dd
File tree
3 files changed
+72
-4
lines changed- sdk/monitor/monitor-opentelemetry-exporter
- src/export/statsbeat
- test/internal
3 files changed
+72
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
3 | 15 | | |
4 | 16 | | |
5 | 17 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
Lines changed: 57 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
307 | 332 | | |
308 | 333 | | |
309 | 334 | | |
| |||
459 | 484 | | |
460 | 485 | | |
461 | 486 | | |
462 | | - | |
| 487 | + | |
463 | 488 | | |
464 | 489 | | |
465 | 490 | | |
| |||
477 | 502 | | |
478 | 503 | | |
479 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
480 | 535 | | |
481 | 536 | | |
482 | 537 | | |
| |||
0 commit comments