Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics + OpenTelemetry Tracing #541

Merged
merged 19 commits into from
Sep 10, 2024
Merged

Metrics + OpenTelemetry Tracing #541

merged 19 commits into from
Sep 10, 2024

Conversation

pablohoch
Copy link
Member

@pablohoch pablohoch commented Sep 6, 2024

Adds various Prometheus metrics:

  • HTTP endpoint: /metrics (only when the metrics module is loaded)
  • Metrics include:
    • Number of routing requests (nigiri + intermodal)
    • Routing time histograms
    • Some routing request statistics (e.g. number of via stations)
    • GTFS-RT metrics per feed (updates, errors, number of entities, timestamp of latest update etc.)

Adds OpenTelemetry Tracing:

  • Set the otlp_http=1 config option to enable the OTLP HTTP exporter
    • Exporter configuration is currently done via environment variables (see the documentation), e.g. by setting OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 (which is the default).
    • Currently only the OTLP HTTP exporter is supported (i.e. Protocol Buffers (default) or JSON via HTTP, no gRPC).

Needs motis-project/nigiri#131

Closes #222

OpenTelemetry Tracing Examples

Screenshots from Jaeger UI:

Intermodal routing request:
intermodal-02

GTFS-RT update:
gtfs-rt-update

Import:
import

Context propagation:
context-propagation

@pablohoch pablohoch marked this pull request as ready for review September 9, 2024 14:46
@pablohoch pablohoch merged commit 0ba35be into master Sep 10, 2024
19 checks passed
@pablohoch pablohoch deleted the metrics branch September 10, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracing / OpenTelemetry
1 participant