Skip to content

Conversation

@cedricgarcia-wttj
Copy link
Contributor

This pull request introduces OpenTelemetry integration into the Chargebeex library, enabling users to implement custom span instrumentation for tracing and monitoring. It includes a default no-op implementation and allows configuration of custom adapters. Additionally, OpenTelemetry spans are integrated into the Chargebeex.Client module for HTTP request tracing.

OpenTelemetry Integration

  • Documentation Update: Added a new section in the README.md explaining OpenTelemetry integration, including default behavior, custom implementation examples, configuration, and usage.
  • Default Implementation: Implemented a no-op module Chargebeex.OpenTelemetry.Default that adheres to the OpenTelemetry behavior, serving as the default adapter.
  • Behavior Definition: Defined the Chargebeex.OpenTelemetry.OpenTelemetryBehaviour module, specifying the required callbacks for custom OpenTelemetry adapters.

Client Module Enhancements

  • Tracing Integration: Integrated OpenTelemetry span creation into the Chargebeex.Client module for get and post methods, enabling automatic tracing of HTTP requests.
  • Adapter Configuration: Added a private function otel_adapter/0 in Chargebeex.Client to fetch the configured OpenTelemetry adapter, defaulting to Chargebeex.OpenTelemetry.Default.

@cedricgarcia-wttj cedricgarcia-wttj requested a review from a team as a code owner April 24, 2025 15:10
@cedricgarcia-wttj cedricgarcia-wttj deleted the feat-add-opentelemetry-adapter branch May 6, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant