Open Erates opened 1 month ago
I think you'll have to set distributed_tracing.type=grpc
in the OPA config to enable this.
I think you'll have to set
distributed_tracing.type=grpc
in the OPA config to enable this.
Hey @ashutosh-narkar, this works, but that also means that it tries to send the traces to an OpenTelemetry Tracing endpoint. We do not have that. So we can not fill in the distributed_tracing.address
or service_name
, causing frequent warn log entries Distributed tracing: traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp 127.0.0.1:4317: connect: connection refused\"
.
I've also tried putting the sample_percentage to 0, but then still it tries to send the spans (or at least, create the connection).
Maybe an option distributed_tracing.type=log
so that the trace_id and span_id are logged, but not sent to an external service?
Also, since the Decision Log Service API documentation is the only place referring to the trace_id, maybe add a link to the distributed_tracing
documentation when the trace_id is required.
Also, since the Decision Log Service API documentation is the only place referring to the trace_id, maybe add a link to the distributed_tracing documentation when the trace_id is required.
Sure, feel free to submit a PR with the doc updates.
Maybe an option distributed_tracing.type=log so that the trace_id and span_id are logged, but not sent to an external service?
If you turn on console decision logging they get logged. Couldn't you just use that?
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. Although currently inactive, the issue could still be considered and actively worked on in the future. More details about the use-case this issue attempts to address, the value provided by completing it or possible solutions to resolve it would help to prioritize the issue.
Short description
According to the documentation, OPA supports W3C tracing. Thus, we send the
traceparent
header to OPA when performing a REST request that evaluates policies. But we can not find a single place where this trace information is outputted. The documentation regarding decision logs mentions that the log should output the trace_id and span_id. But the trace info is not shown when outputting the decision logs to the console, configured usingdecision_logs.console=true
.OPA version used:
0.67.0
Steps To Reproduce
policy/example.rego
with the contentimport rego.v1
result := input.message
{ "input": { "message": "Hello world!" } }
Expected behavior
We expect that (at least) the decision log in console contains the
trace_id
andspan_id
as mentioned in the documentation.It would also be good that every log statement performed in this current span contain the trace_id and span_id.
We do not have a central OpenTelemetry collector that is able to receive requests made using the Decision Log Service API. We do have log collectors running on every pod. So outputting the log in the console is a good option for us.