-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration test for OTLP internal metrics (#2058)
* add integration test for OTLP internal metrics * rename otel gen app
- Loading branch information
Showing
7 changed files
with
171 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
stream_over_http_enabled: true | ||
server: | ||
http_listen_port: 3200 | ||
log_level: info | ||
|
||
|
||
cache: | ||
background: | ||
writeback_goroutines: 5 | ||
caches: | ||
- roles: | ||
- frontend-search | ||
memcached: | ||
host: memcached:11211 | ||
|
||
query_frontend: | ||
search: | ||
duration_slo: 5s | ||
throughput_bytes_slo: 1.073741824e+09 | ||
trace_by_id: | ||
duration_slo: 5s | ||
|
||
distributor: | ||
receivers: # this configuration will listen on all ports and protocols that tempo is capable of. | ||
jaeger: # the receives all come from the OpenTelemetry collector. more configuration information can | ||
protocols: # be found there: https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver | ||
thrift_http: # | ||
grpc: # for a production deployment you should only enable the receivers you need! | ||
thrift_binary: | ||
thrift_compact: | ||
zipkin: | ||
otlp: | ||
protocols: | ||
http: | ||
grpc: | ||
opencensus: | ||
|
||
ingester: | ||
max_block_duration: 5m # cut the headblock when this much time passes. this is being set for demo purposes and should probably be left alone normally | ||
|
||
compactor: | ||
compaction: | ||
block_retention: 1h # overall Tempo trace retention. set for demo purposes | ||
|
||
metrics_generator: | ||
registry: | ||
external_labels: | ||
source: tempo | ||
cluster: docker-compose | ||
storage: | ||
path: /var/tempo/generator/wal | ||
remote_write: | ||
- url: http://prometheus:9090/api/v1/write | ||
send_exemplars: true | ||
traces_storage: | ||
path: /var/tempo/generator/traces | ||
|
||
storage: | ||
trace: | ||
backend: local # backend configuration to use | ||
wal: | ||
path: /var/tempo/wal # where to store the wal locally | ||
local: | ||
path: /var/tempo/blocks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
internal/cmd/integration-tests/tests/otlp-metrics/otlp_alloy_integration_metrics_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//go:build !windows | ||
|
||
package main | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/grafana/alloy/internal/cmd/integration-tests/common" | ||
) | ||
|
||
func TestAlloyIntegrationMetrics(t *testing.T) { | ||
// These otel metrics are needed in the k8s-monitoring helm chart (https://github.com/grafana/k8s-monitoring-helm/blob/main/charts/k8s-monitoring-v1/default_allow_lists/alloy_integration.yaml) | ||
var OTLPMetrics = []string{ | ||
"otelcol_exporter_send_failed_spans_total", | ||
"otelcol_exporter_sent_spans_total", | ||
"otelcol_processor_batch_batch_send_size_bucket", | ||
"otelcol_processor_batch_metadata_cardinality", | ||
"otelcol_processor_batch_timeout_trigger_send_total", | ||
"otelcol_receiver_accepted_spans_total", | ||
"otelcol_receiver_refused_spans_total", | ||
} | ||
common.MimirMetricsTest(t, OTLPMetrics, []string{}, "otlp_integration") | ||
} |