Factor out instrumentation code. Add metrics and logging to otel.

This commit is contained in:
Daniel Lundin 2024-11-27 16:31:04 +01:00
parent 421bed1611
commit 2da3a239cd
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI
6 changed files with 200 additions and 50 deletions
controller

View file

@ -1,5 +1,6 @@
[package]
name = "patagia-controller"
description = "Patagia controller server"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"
@ -23,6 +24,10 @@ opentelemetry_sdk = { version = "0.27.0", features = ["rt-tokio"] }
opentelemetry-otlp = { version = "0.27.0", features = ["http-proto", "hyper-client", "opentelemetry-http", "trace"] }
opentelemetry = "0.27.0"
opentelemetry-semantic-conventions = "0.27.0"
tracing-core = "0.1.33"
opentelemetry-appender-tracing = { version = "0.27.0", features = ["log", "experimental_metadata_attributes"] }
opentelemetry-stdout = "0.27.0"
once_cell = "1.20.2"
[[bin]]
name = "patagia-controller"