Log Streaming adding headers for environment identification not working

Hi,

We have multiple environments with different instances of N8N and I want to identify from which environment/instance the logs are coming from.

In the webhook Endpoint, there’s an option to add a query parameters or header that from my understanding should do what I want, but it doesn’t seem to add those key pair values to the logs.

I’ve tried a few different ways using JSON or “Using Fields Below” and adding the name like “environment” and value “dev” for instance. I don’t see these being added in the logs.

What’s the best way to achieve that ? Has anyone been able to do something similar ?

The current version we are using is 2.9.3

Thank you

Hi @Adonist

When I configure headers or query params in the Log Streaming generic webhook, I treat them as part of the HTTP request metadata that n8n sends to the endpoint, not something that gets automatically injected into the log’s JSON payload. So if your collector only shows the request body, I wouldn’t expect to see something like environment=dev inside the event itself.

What I’d do is first check on the receiving endpoint side whether those headers or query params are actually coming through. If you need that identifier inside the payload, I’d handle that at the collector or ingestion pipeline level by enriching the log using those headers, query params, or even separate endpoints per environment.

Since you’re on 2.9.3, I’d also try this on a newer version. But based on how this feature is currently documented, I see this as request-level metadata, not payload enrichment.