mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 00:40:25 +02:00
New tracing system (#5388)
* update tracing config definitions * new tracing system * performance improvements * only configure tracing in envoy if it is enabled in pomerium * [tracing] refactor to use custom extension for trace id editing (#5420) refactor to use custom extension for trace id editing * set default tracing sample rate to 1.0 * fix proxy service http middleware * improve some existing auth related traces * test fixes * bump envoyproxy/go-control-plane * code cleanup * test fixes * Fix missing spans for well-known endpoints * import extension apis from pomerium/envoy-custom
This commit is contained in:
parent
832742648d
commit
396c35b6b4
121 changed files with 6096 additions and 1946 deletions
|
@ -6,7 +6,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/open-policy-agent/opa/rego"
|
||||
octrace "go.opencensus.io/trace"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
|
||||
"github.com/pomerium/pomerium/authorize/internal/store"
|
||||
"github.com/pomerium/pomerium/config"
|
||||
|
@ -209,9 +209,9 @@ func (e *PolicyEvaluator) Evaluate(ctx context.Context, req *PolicyRequest) (*Po
|
|||
}
|
||||
|
||||
func (e *PolicyEvaluator) evaluateQuery(ctx context.Context, req *PolicyRequest, query policyQuery) (*PolicyResponse, error) {
|
||||
ctx, span := trace.StartSpan(ctx, "authorize.PolicyEvaluator.evaluateQuery")
|
||||
ctx, span := trace.Continue(ctx, "authorize.PolicyEvaluator.evaluateQuery")
|
||||
defer span.End()
|
||||
span.AddAttributes(octrace.StringAttribute("script_checksum", query.checksum()))
|
||||
span.SetAttributes(attribute.String("script_checksum", query.checksum()))
|
||||
|
||||
rs, err := safeEval(ctx, query.PreparedEvalQuery,
|
||||
rego.EvalInput(req),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue