4 ms·
Maybe surprisingly, there doesn't seem to be an open source C client library for OpenTelemetry at the moment -- I'd guess that such a library would make introdu
by jka 4y ago
Maybe surprisingly, there doesn't seem to be an open source C client library for OpenTelemetry at the moment -- I'd guess that such a library would make introducing spans/traces in PostgreSQL a bit easier (although to be honest, I don't know/remember much about calling and linking to C++ libraries from a C codebase).
(note: there is a C++ client[1], although they mention that support for C is not currently[2] a goal of the project -- and I couldn't find any C implementations elsewhere)
[1] - https://github.com/open-telemetry/opentelemetry-cpp.git/ https://github.com/open-telemetry/opentelemetry-cpp.git/
[2] - https://github.com/open-telemetry/opentelemetry-cpp/tree/db6b4f8467ff04f3a434acc83199ee5f0687ac94#supported-c-versions https://github.com/open-telemetry/opentelemetry-cpp/tree/db6...
- jka 4y agoFollow-up after doing some more research out of curiosity: it looks like Fluent Bit's C library[1] may support OpenTelemetry trace output in future. A quote from their v1.9.0 release notes[1]: > We fully support Prometheus & OpenMetrics and we are also shipping experimental OpenTelemetry metrics support (spoiler: traces will come shortly!). (I've no affiliation with Fluent nor particular knowledge of observability, so if anyone's interested in these findings, take them with a grain of salt :)) [1] - https://docs.fluentbit.io/manual/development/library_api https://docs.fluentbit.io/manual/development/library_api [2] - https://fluentbit.io/announcements/v1.9.0/ https://fluentbit.io/announcements/v1.9.0/
- l-albertovich 4y agoI wrote the code for the OpenTelemetry metrics I/O plugins and the underlying decoder and encoder, I'd be happy to answer any questions related to it.
- jka 4y agoHello :) Would capturing and sending OpenTelemetry metrics from the PostgreSQL codebase using the Fluent Bit C library + the OT plugin require a separate process on the host at runtime? (in other words, does the library ship those events to a collector/transmitter process, or is everything handled in-process?)
- l-albertovich 4y agoEverything is handled in process, you can find some examples in the runtime test cases. [1] - https://github.com/fluent/fluent-bit/blob/master/tests/runtime/out_splunk.c https://github.com/fluent/fluent-bit/blob/master/tests/runti...
- jka 4y agoThank you!
- moderation 4y agoVector is going to add an OpenTelemetry source and sink too [0]. The PR isn't merged yet but Envoy Proxy is about to get an OpenTelemetry exporter that is written in C++ [1] 0. https://vector.dev/releases/0.21.0/#whats-next https://vector.dev/releases/0.21.0/#whats-next 1. https://github.com/envoyproxy/envoy/pull/20281 https://github.com/envoyproxy/envoy/pull/20281