File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
docker/docker-compose-aspnetcore
src/Grafana.OpenTelemetry.Base/Instrumentations Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,8 @@ expected:
1414 contains :
1515 - ' Application started'
1616 metrics :
17- # Investigate why this fails
18- # - promql: db_client_operation_duration{}
19- # value: '>= 0'
17+ - promql : db_client_operation_duration_seconds_count{}
18+ value : ' >= 0'
2019 - promql : http_client_request_duration_seconds_count{}
2120 value : ' >= 0'
2221 - promql : http_client_request_duration_seconds_count{http_request_method="GET", http_response_status_code="200"}
Original file line number Diff line number Diff line change 33// SPDX-License-Identifier: Apache-2.0
44//
55
6+ using OpenTelemetry . Metrics ;
67using OpenTelemetry . Trace ;
78
89namespace Grafana . OpenTelemetry
@@ -11,6 +12,11 @@ internal class SqlClientInitializer : InstrumentationInitializer
1112 {
1213 public override Instrumentation Id { get ; } = Instrumentation . SqlClient ;
1314
15+ protected override void InitializeMetrics ( MeterProviderBuilder builder )
16+ {
17+ builder . AddSqlClientInstrumentation ( ) ;
18+ }
19+
1420 protected override void InitializeTracing ( TracerProviderBuilder builder )
1521 {
1622 builder . AddSqlClientInstrumentation ( ) ;
You can’t perform that action at this time.
0 commit comments