Skip to content

Adding additional metadata for fetch requests Β #901

@GlynnPhillips

Description

@GlynnPhillips

The ability to add additional metadata to fetch requests

What problem does this feature solve?

A couple of scenarios I think this would help for

  1. When using GraphQL endpoints it would be useful to add a datapoint that would help to identify what query is being made as currently the tracing doesn't include the body (query)
  2. Being able to identify requests by users who have a flag/AB test enabled

Ideal solution

I haven't given it lots of thought but the first idea that came to mind for me was having a reserved header prefix so any fetch requests can add a header and that is added to the tracing logs. Something like

fetch(url, {
    headers: {
        'x-opentelemetry-keyname': 'value'
    }
});

Alternatives

πŸ€·β€β™‚οΈ I am not familiar enough with this software to know if my suggestion would even work so alternatives are a stretch πŸ˜„

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    πŸ“₯ Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions