Feat/envoy logs#188
Draft
JoseSzycho wants to merge 2 commits into
Draft
Conversation
…ctor collector and e2e tests accordingly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
This PR should not be merged. It has been created to show how we can capture the HTTPRoute usage signals.
Once the corresponding enhamcenete has been approved and merged into main, continue with the work on this PR.
Related to:
Summary
x-datum-project-namerequest header into every downstreamHTTPRouterule via aRequestHeaderModifierfilter, sourcing the value from the upstream cluster name (Milo project name). Merges into existing modifiers rather than appending a second one.project_name: "%REQ(X-DATUM-PROJECT-NAME)%"and add anOpenTelemetrysink alongside the existingFilesink, pushing access logs directly to thebilling-usage-collector-vectorOTLP receiver.opentelemetrysource (gRPC :4317, HTTP :4318), a normalization shim that collapses OTLP.attributes.*and http_server top-level fields to a common shape, andproject_nameextraction + emission as a dimension on all four billing CloudEvents.curllog injection to the real OTLP push path; assert theproject_namedimension in the CloudEvent.Why
The billing pipeline previously could only attribute usage to a project by its control-plane namespace UID (
ns-<uid>). This PR surfaces the human-readable project name as a first-class dimension on every billing event, enabling clearer cost attribution in the billing portal without any post-processing joins.Notes
%REQ()%is used instead of%METADATA(ROUTE:...)%because Envoy Gateway's JSON access log formatter does not register the metadata formatter in v1.5.1.Filefor existing log scraping / debugging,OTLPfor the real push path. This makes the OTLP transport topology-independent (works whether Vector runs as a DaemonSet or Stateless-Aggregator).ProviderSinglemode (dev/e2e), the upstream cluster name is the literal string"single". InProviderMilomode it is the real Milo project name.