Skip to content

[FEATURE] Adjust monitoring metrics to latest OpenTelemetry semantic conventions #1662

Open
@cyrille-leclerc

Description

@cyrille-leclerc

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
  • Usage of outdated or undesired atributes:

I'm sorry, I can't code in Go, I can't propose a PR.

Metadata

Metadata

Assignees

Labels

Needs TriageThis issue needs to be investigated by a maintainerenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions