You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds an implementation of the [Correlations
API](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/correlationcontext/api.md)
which is used to annotate telemetry, adding context and information to
metrics, traces, and logs. It is an abstract data type represented by a
set of name/value pairs describing user-defined properties.
Example:
```rust
let propagator = CorrelationContextPropagator::new();
// can extract from any type that impls `Carrier`, usually an HTTP header map
let cx = propagator.extract(&headers);
// Iterate over extracted name / value pairs
for (name, value) in cx.correlation_context() {
// ...
}
// Add new correlations
let cx_with_additions = cx.with_correlations(vec![Key::new("server_id").u64(42)]);
// Inject correlations into http request
propagator.inject_context(&cx_with_additions, &mut headers);
```
Resolves#62
See open-telemetry/oteps#66 for context
The text was updated successfully, but these errors were encountered: