Skip to content

telemetry ​

telemetry records OpenTelemetry metrics of connections with the global meter provider configured in the top level telemetry section.

yaml
telemetry:
  collector: otel-collector:4317

server:
  tcp:
    middlewares:
      metrics:
        telemetry:
          name: postgres
    routers:
      db:
        entrypoints: [db]
        middlewares: [metrics, db_backend]
FieldDefaultDescription
namemiddleware nameValue of the name attribute.
MetricTypeAttributesDescription
turna.tcp.connectionscountername, resultHandled connections. result is ok, error or rejected.
turna.tcp.active_connectionsup-down counternameOpen connections.
turna.tcp.connection.durationhistogram (s)name, resultConnection duration.
turna.tcp.receivedcounter (By)nameBytes received from clients.
turna.tcp.sentcounter (By)nameBytes sent to clients.

Place it first in the router so rejected connections are counted too.