-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support struct values for fields in OTEL AccessLogger #31148
Comments
cc @htuch |
Is the idea to use header formatter variables? |
Hi @htuch , possibly extend access logging formatter somehow. Currently, if the var is set to a dynamic_metadata which is struct, it will be set as a json string but we need to be a struct in OTel accesslogger. |
Can you propose a proto change to make this concrete? |
I had some offline discussion. @TAOXUY I think you should share the use case for the log. AFAICT it's not a request log, it's closer to resource/audit log, which might require multiple entries per-request, for example. In that case, it's OTLP only needs to provide the client network function and receive the entire entry plus resource dynamically. |
Thanks @kyessenov! Yeah, that's our further ask. Essentially we could generate multiple logs(audit log) per access dynamically so we want to the forerunner extension can fully control the OTEL request generation, instead of using the current static declarative way. |
Thanks. I think having a concrete proto change (even if only a sketch in a comment) would be a useful way to clarify what is being proposed. |
@htuch This might actually be a more important question than this PR. The problem is that Wasm extensions have a choice to do two things:
Each approach has merits, so it would be useful to provide some guidance on which approach to take with respect to extensions. |
Thanks Kuat! For envoy/api/envoy/extensions/access_loggers/open_telemetry/v3/logs_service.proto Lines 26 to 49 in da09811
I am thinking introducing something like
Why we need this?
|
For #31148 (comment), I feel this speaks to limitation in ProxyWasm and our ABI (CC @mpwarres @PiotrSikora). Why can't we have better ABI-level support for logging/tracing/stats that can approach what is needed for OTLP? I'm actually super confused on this thread though, it started off as some ask about OT access loggers, and now it's about Wasm ABIs? |
@htuch The original issue did not have the full context. The logs are being produced by a Wasm extension, and need to be exported via OTLP to a different resource (not the request log, multiple entries per log). |
I'm definitely missing some context, but what's missing in Wasm's What's the exact ask that would make Wasm work for OTEL AccessLogger? |
@PiotrSikora Ability to send structured logs (https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/logs/v1/logs.proto), meaning key-value attribute, resource attributes, and structured body. Also, ability to register OTLP for Wasm, and route |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions. |
Description:
the existing otel logger's request format is static by the body and attributes field(the struct layout is defined at the config time). I am wondering if we can make that dynamic by supporting struct values for fields in OTEL AccessLogger
The text was updated successfully, but these errors were encountered: