Skip to content

Commit 8963ae5

Browse files
committed
[exporter/loadbalancing] add attributes details for internal telemetry
This adds the attributes details to metadata.yaml for the load balancing exporter. This uses a new version of mdatagen which hasn't landed yet. Will update this PR from draft when open-telemetry/opentelemetry-collector#12919 is done. Signed-off-by: Alex Boten <[email protected]>
1 parent 1ff442c commit 8963ae5

File tree

2 files changed

+66
-14
lines changed

2 files changed

+66
-14
lines changed

exporter/loadbalancingexporter/documentation.md

+31
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ Response latency in ms for the backends.
1414
| ---- | ----------- | ---------- |
1515
| ms | Histogram | Int |
1616

17+
#### Attributes
18+
19+
| Name | Description | Values |
20+
| ---- | ----------- | ------ |
21+
| endpoint | The endpoint of the backend | Any Str |
22+
1723
### otelcol_loadbalancer_backend_outcome
1824

1925
Number of successes and failures for each endpoint.
@@ -22,6 +28,12 @@ Number of successes and failures for each endpoint.
2228
| ---- | ----------- | ---------- | --------- |
2329
| {outcomes} | Sum | Int | true |
2430

31+
#### Attributes
32+
33+
| Name | Description | Values |
34+
| ---- | ----------- | ------ |
35+
| success | Whether an outcome was successful | Any Bool |
36+
2537
### otelcol_loadbalancer_num_backend_updates
2638

2739
Number of times the list of backends was updated.
@@ -30,6 +42,12 @@ Number of times the list of backends was updated.
3042
| ---- | ----------- | ---------- | --------- |
3143
| {updates} | Sum | Int | true |
3244

45+
#### Attributes
46+
47+
| Name | Description | Values |
48+
| ---- | ----------- | ------ |
49+
| resolver | Resolver used | Str: ``aws``, ``dns``, ``k8s``, ``static`` |
50+
3351
### otelcol_loadbalancer_num_backends
3452

3553
Current number of backends in use.
@@ -38,10 +56,23 @@ Current number of backends in use.
3856
| ---- | ----------- | ---------- |
3957
| {backends} | Gauge | Int |
4058

59+
#### Attributes
60+
61+
| Name | Description | Values |
62+
| ---- | ----------- | ------ |
63+
| resolver | Resolver used | Str: ``aws``, ``dns``, ``k8s``, ``static`` |
64+
4165
### otelcol_loadbalancer_num_resolutions
4266

4367
Number of times the resolver has triggered new resolutions.
4468

4569
| Unit | Metric Type | Value Type | Monotonic |
4670
| ---- | ----------- | ---------- | --------- |
4771
| {resolutions} | Sum | Int | true |
72+
73+
#### Attributes
74+
75+
| Name | Description | Values |
76+
| ---- | ----------- | ------ |
77+
| success | Whether an outcome was successful | Any Bool |
78+
| resolver | Resolver used | Str: ``aws``, ``dns``, ``k8s``, ``static`` |

exporter/loadbalancingexporter/metadata.yaml

+35-14
Original file line numberDiff line numberDiff line change
@@ -11,54 +11,75 @@ status:
1111
emeritus: [jpkrohling]
1212
seeking_new: true
1313

14-
tests:
15-
config:
16-
routing_key: "service"
17-
protocol:
18-
otlp:
19-
timeout: 1s
20-
resolver:
21-
static:
22-
hostnames:
23-
- backend-1:4317
24-
- backend-2:4317
25-
- backend-3:4317
26-
- backend-4:4317
27-
expect_consumer_error: true
14+
attributes:
15+
success:
16+
description: Whether an outcome was successful
17+
type: bool
18+
resolver:
19+
description: Resolver used
20+
type: string
21+
enum:
22+
- aws
23+
- dns
24+
- k8s
25+
- static
26+
endpoint:
27+
description: The endpoint of the backend
28+
type: string
2829

2930
telemetry:
3031
metrics:
3132
loadbalancer_num_resolutions:
33+
attributes: [success, resolver]
3234
enabled: true
3335
description: Number of times the resolver has triggered new resolutions.
3436
unit: "{resolutions}"
3537
sum:
3638
value_type: int
3739
monotonic: true
3840
loadbalancer_num_backends:
41+
attributes: [resolver]
3942
enabled: true
4043
description: Current number of backends in use.
4144
unit: "{backends}"
4245
gauge:
4346
value_type: int
4447
loadbalancer_backend_latency:
48+
attributes: [endpoint]
4549
enabled: true
4650
description: Response latency in ms for the backends.
4751
unit: ms
4852
histogram:
4953
value_type: int
5054
bucket_boundaries: [5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000]
5155
loadbalancer_num_backend_updates:
56+
attributes: [resolver]
5257
enabled: true
5358
description: Number of times the list of backends was updated.
5459
unit: "{updates}"
5560
sum:
5661
value_type: int
5762
monotonic: true
5863
loadbalancer_backend_outcome:
64+
attributes: [success]
5965
enabled: true
6066
description: Number of successes and failures for each endpoint.
6167
unit: "{outcomes}"
6268
sum:
6369
value_type: int
6470
monotonic: true
71+
72+
tests:
73+
config:
74+
routing_key: "service"
75+
protocol:
76+
otlp:
77+
timeout: 1s
78+
resolver:
79+
static:
80+
hostnames:
81+
- backend-1:4317
82+
- backend-2:4317
83+
- backend-3:4317
84+
- backend-4:4317
85+
expect_consumer_error: true

0 commit comments

Comments
 (0)