opentelemetry-python-contrib icon indicating copy to clipboard operation
opentelemetry-python-contrib copied to clipboard

Structlog and Loguru Handlers with Examples

Open carolinecgilbert opened this issue 1 year ago • 3 comments
trafficstars

Description

Implemented unit tests for an existing structlog handler PR and implemented a log handler for the Loguru logging library located in the handlers directory. The tests are located in the opentelemetry-instrumentation-logging test_logging.py file to be compatible with the tox testing framework.

Built basic example OTel applications that use the structlog and loguru handlers to provide guidance on how to implement the handlers.

Dependencies Required: structlog, loguru

Fixes # (issue) https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2139

Type of change

Please delete options that are not relevant.

  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [ ] Implemented handler unit tests in existing test_logging.py file in the tox framework
  • [ ] tox -e test-instrumentation-logging

Does This PR Require a Core Repo Change?

  • [ ] No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • [x] Followed the style guidelines of this project
  • [ ] Changelogs have been updated
  • [x] Unit tests have been added
  • [x] Documentation has been updated

carolinecgilbert avatar May 03 '24 06:05 carolinecgilbert