opentelemetry-demo icon indicating copy to clipboard operation
opentelemetry-demo copied to clipboard

Review and enhance logging support for cart service (C#)

Open cartersocha opened this issue 2 years ago • 2 comments

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

cartersocha avatar May 30 '22 17:05 cartersocha

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?

cijothomas avatar Jun 01 '22 14:06 cijothomas

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!

cartersocha avatar Jun 01 '22 17:06 cartersocha

Closing this as logs are being pushed out

austinlparker avatar Feb 06 '23 16:02 austinlparker