kuma: MeshAccessLog - add support for timeout and retry for TCP backend
Description
Hi,
When sending Kuma logs via DataDog service in K8s we get sporadically error messages from kuma-sidekar with failures to send logs.
It would be nice to add support for configuring timeout & nr. of retries in case of TCP connection failure.
About this issue
- Original URL
- State: open
- Created 8 months ago
- Reactions: 3
- Comments: 18 (6 by maintainers)
Hey, I did some investigation on the “body” and our docs are lacking, or rather examples.
Our docs says
This body field is field from OTEL and it’s quite complex. If you want to do key value you can do this
KUMA_MESH is then interpolated just fine.
We should also do a better job at failing when the format is not right instead of fallback to a default. I agree that it’s confusing.
When it comes to retries. I think
grpc_stream_retry_policycould help. Let my try to compose MeshProxyPatch to configure this. If this becomes useful we could incorporate this into MeshAccessLog policyOpenTelemetry can also be used for logs.
Here we support this in MeshAccessLog https://kuma.io/docs/2.5.x/policies/meshaccesslog/#opentelemetry
And it seems that Datadog agent now has a builtin support for it https://www.datadoghq.com/blog/agent-otlp-log-ingestion/
@jakubdyszkiewicz JFYI - example
works as expected and DataDog is happy with it and indexing the
meshfield. I think it would be good to update the documentation with it as it is very confusing atm.@jakubdyszkiewicz I was able to get OTLP logs working, however, it also has own problems:
openTelemetry.attributesfields do not accept%KUMA_*%placeholders. Moreover, it renders bad config for envoy, so it stops accepting any changes.openTelemetry.bodyfield accepts%KUMA_*%placeholders, but it does escaping automatically, so json is getting escaped and not parsed by DD correctlyopenTelemetry.bodyobject instead of string (just usingtest: "value"but seems that such config is silently ignored by Kuma and it reverts to default text lineCould you please help with that?
@jakubdyszkiewicz i see that if oltp logs are specified
kumajust configures envoy to send the logs in openmetrics format. But i did not found any retry logic/settings/documentation in envoy about it. Do you know any details?