opentelemetry-demo
opentelemetry-demo copied to clipboard
Review and enhance logging support for cart service (C#)
As OpenTelemetry Logging has not fully stabilized, this list of requirements may change in future releases.
- [ ] Log events in existing services should be converted to span events where appropriate (i.e., the event occurs within a transaction)
- [ ] Logs should be emitted with OpenTelemetry resources and context for correlation where possible.
- [ ] Logs should be scraped by OpenTelemetry Collectors for further filtering and processing.
Referencing issue: https://github.com/open-telemetry/opentelemetry-demo-webstore/issues/44
Service: Service: https://github.com/open-telemetry/opentelemetry-demo-webstore/tree/main/src/cartservice
I can help with this item.
To begin with, I can replace the Console.Write with ILogger
calls.,
Then wire up OpenTelemetry with OTLP Exporter.
Then add resources.
Not sure about using SpanEvent vs using dedicated Logging API. Do we have a preference on one vs other?
From the architecture doc I think our preference is to set this as a span event.
"Services should attach log events to spans where appropriate E.g., the log occurs during a span transaction"
@austinlparker or @jsirianni feel free to correct me!
Closing this as logs are being pushed out