Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore][exporter/loadbalancing] Migrate to OTel from OC metrics #33550

Merged
merged 5 commits into from
Jun 20, 2024

Conversation

jpkrohling
Copy link
Member

@jpkrohling jpkrohling commented Jun 13, 2024

This PR migrates from OpenCensus to OTel for metrics, via mdatagen.

Before:

# HELP otelcol_loadbalancer_backend_latency Response latency in ms for the backends
# TYPE otelcol_loadbalancer_backend_latency histogram
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="5"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="10"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="20"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="50"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="100"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="200"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="500"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="1000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="2000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="5000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="+Inf"} 1
otelcol_loadbalancer_backend_latency_sum{endpoint="127.0.0.1:5317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev"} 0
otelcol_loadbalancer_backend_latency_count{endpoint="127.0.0.1:5317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="5"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="10"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="20"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="50"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="100"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="200"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="500"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="1000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="2000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="5000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="+Inf"} 1
otelcol_loadbalancer_backend_latency_sum{endpoint="127.0.0.1:6317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev"} 0
otelcol_loadbalancer_backend_latency_count{endpoint="127.0.0.1:6317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="5"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="10"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="20"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="50"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="100"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="200"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="500"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="1000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="2000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="5000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",le="+Inf"} 1
otelcol_loadbalancer_backend_latency_sum{endpoint="127.0.0.1:7317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev"} 0
otelcol_loadbalancer_backend_latency_count{endpoint="127.0.0.1:7317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev"} 1
# HELP otelcol_loadbalancer_backend_outcome Number of success/failures for each endpoint
# TYPE otelcol_loadbalancer_backend_outcome counter
otelcol_loadbalancer_backend_outcome{endpoint="127.0.0.1:5317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",success="true"} 1
otelcol_loadbalancer_backend_outcome{endpoint="127.0.0.1:6317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",success="true"} 1
otelcol_loadbalancer_backend_outcome{endpoint="127.0.0.1:7317",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",success="true"} 1
# HELP otelcol_loadbalancer_num_backend_updates Number of times the list of backends was updated
# TYPE otelcol_loadbalancer_num_backend_updates counter
otelcol_loadbalancer_num_backend_updates{resolver="static",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev"} 2
# HELP otelcol_loadbalancer_num_backends Current number of backends in use
# TYPE otelcol_loadbalancer_num_backends gauge
otelcol_loadbalancer_num_backends{resolver="static",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev"} 3
# HELP otelcol_loadbalancer_num_resolutions Number of times the resolver triggered a new resolutions
# TYPE otelcol_loadbalancer_num_resolutions counter
otelcol_loadbalancer_num_resolutions{resolver="static",service_instance_id="6960afd1-4bb6-4c52-bdc7-d8b236ad8eba",service_name="otelcontribcol",service_version="0.102.0-dev",success="true"} 2

After:

# HELP otelcol_loadbalancer_backend_latency Response latency in ms for the backends.
# TYPE otelcol_loadbalancer_backend_latency histogram
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="5"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="10"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="20"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="50"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="100"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="200"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="500"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="1000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="2000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="5000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:5317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="+Inf"} 1
otelcol_loadbalancer_backend_latency_sum{endpoint="127.0.0.1:5317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev"} 0
otelcol_loadbalancer_backend_latency_count{endpoint="127.0.0.1:5317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="5"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="10"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="20"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="50"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="100"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="200"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="500"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="1000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="2000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="5000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:6317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="+Inf"} 1
otelcol_loadbalancer_backend_latency_sum{endpoint="127.0.0.1:6317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev"} 0
otelcol_loadbalancer_backend_latency_count{endpoint="127.0.0.1:6317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="5"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="10"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="20"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="50"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="100"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="200"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="500"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="1000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="2000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="5000"} 1
otelcol_loadbalancer_backend_latency_bucket{endpoint="127.0.0.1:7317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",le="+Inf"} 1
otelcol_loadbalancer_backend_latency_sum{endpoint="127.0.0.1:7317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev"} 0
otelcol_loadbalancer_backend_latency_count{endpoint="127.0.0.1:7317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev"} 1
# HELP otelcol_loadbalancer_backend_outcome Number of success/failures for each endpoint.
# TYPE otelcol_loadbalancer_backend_outcome counter
otelcol_loadbalancer_backend_outcome{endpoint="127.0.0.1:5317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",success="true"} 1
otelcol_loadbalancer_backend_outcome{endpoint="127.0.0.1:6317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",success="true"} 1
otelcol_loadbalancer_backend_outcome{endpoint="127.0.0.1:7317",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",success="true"} 1
# HELP otelcol_loadbalancer_num_backend_updates Number of times the list of backends was updated.
# TYPE otelcol_loadbalancer_num_backend_updates counter
otelcol_loadbalancer_num_backend_updates{resolver="static",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev"} 2
# HELP otelcol_loadbalancer_num_backends Current number of backends in use.
# TYPE otelcol_loadbalancer_num_backends gauge
otelcol_loadbalancer_num_backends{resolver="static",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev"} 3
# HELP otelcol_loadbalancer_num_resolutions Number of times the resolver triggered a new resolutions.
# TYPE otelcol_loadbalancer_num_resolutions counter
otelcol_loadbalancer_num_resolutions{resolver="static",service_instance_id="660642c9-c94c-48ae-abf3-3808f8562941",service_name="otelcontribcol",service_version="0.102.0-dev",success="true"} 2

Tested with this configuration file:

receivers:
  otlp/loadbalancer:
    protocols:
      grpc:
        endpoint: 127.0.0.1:4317
  otlp/backend-1:
    protocols:
      grpc:
        endpoint: 127.0.0.1:5317
  otlp/backend-2:
    protocols:
      grpc:
        endpoint: 127.0.0.1:6317
  otlp/backend-3:
    protocols:
      grpc:
        endpoint: 127.0.0.1:7317

processors:

exporters:
  nop:
  loadbalancing:
    protocol:
      otlp:
        tls:
          insecure: true
    resolver:
      static:
        hostnames:
        - 127.0.0.1:5317
        - 127.0.0.1:6317
        - 127.0.0.1:7317

service:
  pipelines:
    traces/loadbalancer:
      receivers: [ otlp/loadbalancer ]
      processors: []
      exporters: [ loadbalancing ]
    traces/backends:
      receivers: [ otlp/backend-1, otlp/backend-2, otlp/backend-3 ]
      processors: []
      exporters: [ nop ]
    logs/loadbalancer:
      receivers: [ otlp/loadbalancer ]
      processors: []
      exporters: [ loadbalancing ]
    logs/backends:
      receivers: [ otlp/backend-1, otlp/backend-2, otlp/backend-3 ]
      processors: []
      exporters: [ nop ]

And this was the test command:

telemetrygen traces --traces 100 --otlp-insecure --otlp-attributes='vip="false"'

Closes #33472

Signed-off-by: Juraci Paixão Kröhling [email protected]

@jpkrohling jpkrohling requested review from a team and crobert-1 June 13, 2024 14:51
@jpkrohling jpkrohling force-pushed the jpkrohling/issue33472 branch 2 times, most recently from 4d61bb9 to 97d172f Compare June 13, 2024 15:16
@jpkrohling jpkrohling requested review from codeboten and removed request for crobert-1 June 13, 2024 15:16
Copy link
Member

@crobert-1 crobert-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know the metrics and their descriptions are just being moved here, so feel free to drop my nits around wording of metric descriptions if you want to keep this PR as minimal and straightforward as possible.

exporter/loadbalancingexporter/metadata.yaml Show resolved Hide resolved
exporter/loadbalancingexporter/log_exporter.go Outdated Show resolved Hide resolved
exporter/loadbalancingexporter/metadata.yaml Outdated Show resolved Hide resolved
exporter/loadbalancingexporter/metadata.yaml Show resolved Hide resolved
exporter/loadbalancingexporter/metadata.yaml Outdated Show resolved Hide resolved
exporter/loadbalancingexporter/metrics_exporter.go Outdated Show resolved Hide resolved
exporter/loadbalancingexporter/resolver_dns.go Outdated Show resolved Hide resolved
exporter/loadbalancingexporter/trace_exporter.go Outdated Show resolved Hide resolved
@jpkrohling
Copy link
Member Author

I'll rebase this once the new release is out.

Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
@jpkrohling jpkrohling force-pushed the jpkrohling/issue33472 branch from 25f86c5 to 89e61e6 Compare June 20, 2024 11:01
@jpkrohling
Copy link
Member Author

Rebased!

Signed-off-by: Juraci Paixão Kröhling <[email protected]>
@jpkrohling
Copy link
Member Author

@crobert-1, I'm merging this with two discussions that I didn't resolve but I feel that they have sufficient explanations. I'm open to considering a change to the gauge if there's a good reason for it.

@jpkrohling jpkrohling merged commit 40b334a into open-telemetry:main Jun 20, 2024
154 checks passed
@github-actions github-actions bot added this to the next release milestone Jun 20, 2024
@crobert-1
Copy link
Member

@crobert-1, I'm merging this with two discussions that I didn't resolve but I feel that they have sufficient explanations. I'm open to considering a change to the gauge if there's a good reason for it.

No worries, LGTM. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate from opencensus library: exporter/loadbalancing
3 participants