Open tqwewe opened 1 year ago
Overall it looks good! All metrics include some attributes like: node id, environment id, process id. They are not implicitly set, right? We have to set them on each call? We also want to set them in vm, no guest, so that it can be trusted.
Actually the process_id and environment_id is not attached to every trace/metric, but is only attached to the parent spans. This might be a problem though since if the runtime exits without closing a span properly (which is quite likely), then we might not know which environment the spans come from.
I'll work on injecting this data to every span/log/metric.
Todo:
target_info
. (Turns out its not possible)Spans cannot be shared across processes, as they are in a tree structure, and sharing them means it would be possible to drop a parent span before its child, which wouldn't make sense.
Running the spawn process benchmark, this PR does not seem to affect performance of spawning processes.
Related PRs: https://github.com/open-telemetry/opentelemetry-rust/pull/1009 https://github.com/open-telemetry/opentelemetry-rust/pull/1018
Screenshots for examples/metrics.rs
https://github.com/lunatic-solutions/lunatic-rs/blob/4681561eb78d1164bc1b2eef7c436bcab36622ab/examples/metrics.rs#L21-L78
Terminal
Jaeger![jaeger](https://user-images.githubusercontent.com/16362377/230304575-25352bfe-4dbc-4b2a-bb3f-4d78b6fcf52f.png)
Prometheus![prometheus](https://user-images.githubusercontent.com/16362377/230304621-5e3844b1-e361-4510-a635-7305b5109708.png)