Skip to content

Conversation

edsiper
Copy link
Member

@edsiper edsiper commented Jul 6, 2025

The current codebase handles OTLP JSON, OTLP Protobuf, and Fluent Bit log chunk encoding directly within plugins like in_opentelemetry and out_opentelemetry, making the logic difficult to test and reuse in isolation.

This PR introduces the foundation for a new abstraction layer to centralize OTLP encoding and decoding tailored to Fluent Bit’s needs. As part of this change, in_opentelemetry now delegates OTLP Log JSON parsing to this new interface, and the legacy inline parsing logic has been deprecated.

In addition to improving testability and maintainability, the new interface introduces explicit encoding/decoding error types. These errors are now propagated to plugin consumers, enabling more informative and actionable error messages for end users when OTLP data fails to decode correctly.

as part of the changes, we added some minor fixes for protection in the pack and log_event_encoder_dynamic_field interfaces.


Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

@edsiper
Copy link
Member Author

edsiper commented Jul 7, 2025

CI issue with macos, all looks good.

@edsiper edsiper merged commit 616c5b2 into master Jul 7, 2025
51 of 52 checks passed
@edsiper edsiper deleted the opentelemetry-interface branch July 7, 2025 17:55
@edsiper edsiper added opentelemetry Fluent Bit + OpenTelemetry integration and removed docs-required labels Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
opentelemetry Fluent Bit + OpenTelemetry integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant