Open
Description
Requirements
Flagd uses the outdated OpenTelemetry Semantic Conventions 1.18 (here), producing outdated OTel metric that are not recognized by OpenTelemetry dashboards like the Lightweight APM for OpenTelemetry
HTTP Request Duration
# Current Flagd metric
http.server.duration {
http.method: "POST",
http.status_code: "200",
http.url: "/flagd.evaluation.v1.Service/EventStream"
}
# Expected
http.server.request.duration {
http.request.method: "POST"
http.response.status_code: "200",
http.route: "/flagd.evaluation.v1.Service/EventStream"
url.scheme: "http"
}
Metric specs here.
Type | Current | Expected |
---|---|---|
Name | http.server.duration |
http.server.request.duration (specs) |
Attribute | http.method |
http.request.method (specs) |
Attribute | http.status_code |
http.response.status_code (specs) |
Attribute | http.url |
http.route (specs) ⚠ http.url MUST NOT be used as it's a high cardinality attribute |
Attribute | url.scheme (specs) |
HTTP Response Size
# Current Flagd metric
http.server.response.size {
http.method: "POST",
http.status_code: "200",
http.url: "/flagd.evaluation.v1.Service/EventStream"
}
# Expected
http.server.response.body.size {
http.request.method: "POST"
http.response.status_code: "200",
http.route: "/flagd.evaluation.v1.Service/EventStream"
url.scheme: "http"
}
Metric specs here.
Type | Current | Expected |
---|---|---|
Name | http.server.response.size |
http.server.response.body.size (specs) |
Attribute | http.method |
http.request.method (specs) |
Attribute | http.status_code |
http.response.status_code (specs) |
Attribute | http.url |
http.route (specs) ⚠ http.url MUST NOT be used as it's a high cardinality attribute |
Attribute | url.scheme (specs) |
Source Code
- Imports of outdated semconv v1.18.0 or v1.13.0 here
- Outdated OTel metric names
flagd/core/pkg/telemetry/metrics.go
Lines 22 to 23 in 07a45d9
- Usage of outdated or undesired atributes:
flagd/core/pkg/telemetry/metrics.go
Lines 74 to 76 in 07a45d9
I'm sorry, I can't code in Go, I can't propose a PR.