You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OTLP ingestion routes ignore the X-P-Dataset-Tags header #154
The OTLP ingestion routes (POST /v1/logs, /v1/metrics, /v1/traces) do not read the X-P-Dataset-Tags header. A dataset that is created by its first OTLP request therefore gets no tags, whatever the sender set.
Upstream reads the header on these routes since parseablehq#1869 (commit 3767d384, the OTLP protobuf change): dataset_tags_from_headers in src/handlers/http/ingest.rs parses it, passes the tags to stream creation, and rejects the agent-observability tag on anything but a traces dataset (validate_agent_observability_constraints in src/handlers/mod.rs).
The port of that commit to this fork left the header handling out, because it is separate from protobuf support and the fork has no validate_agent_observability_constraints.
What exists here today
X-P-Dataset-Tags is read only when a stream is created explicitly (src/handlers/http/modal/utils/logstream_utils.rs).
create_stream_if_not_exists already takes dataset_tags (src/parseable/mod.rs); the OTLP handlers pass an empty list.
To do
Port dataset_tags_from_headers and validate_agent_observability_constraints from upstream 3767d384, with upstream's four tests.
Call it in the three OTLP handlers, for both JSON and protobuf bodies, and pass the tags to stream creation.
Decide what a request with tags does when the dataset already exists with different tags. Upstream passes the tags only to stream creation, so it appears to ignore the header then; confirm that and pin it with a test.
Activity