Skip to content

Commit f0ce29f

Browse files
authored
Remove attributes from http.server.active_requests metric to prevent emitting too many (#1060)
1 parent 0ef05d9 commit f0ce29f

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

logfire/_internal/config.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,18 @@ def check_token():
10241024
View(
10251025
instrument_type=Histogram,
10261026
aggregation=ExponentialBucketHistogramAggregation(),
1027-
)
1027+
),
1028+
View(
1029+
instrument_type=UpDownCounter,
1030+
instrument_name='http.server.active_requests',
1031+
attribute_keys={
1032+
'url.scheme',
1033+
'http.scheme',
1034+
'http.flavor',
1035+
'http.method',
1036+
'http.request.method',
1037+
},
1038+
),
10281039
],
10291040
)
10301041
else:

tests/otel_integrations/test_django.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def test_good_route(client: Client, exporter: TestExporter, metrics_reader: InMe
3535
{
3636
'attributes': {
3737
'http.method': 'GET',
38-
'http.server_name': 'testserver',
3938
'http.scheme': 'http',
4039
'http.flavor': '1.1',
4140
'http.request.method': 'GET',

0 commit comments

Comments
 (0)