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
Is your feature request related to a problem? Please describe.
About our current application setup: both client (NextJS+ReactJS) and a gateway/proxy for BE APIs are running on the same node/domain.
In our project we are using manual browser tracing as well as automatic instrumentations, which track the outgoing requests: Fetch and XmlHttpRequest. In order to avoid spamming the export with unnecessary data, we would like to ignore the automatically created spans which are parentless: requests not originating from manual browser traces, which cover specific UI actions, should be ignored/not recorded.
Describe the solution you'd like
Improve Fetch and XmlHttpRequest automatic instrumentations by adding a configuration option which when set to true would allow to not record the spans that were initiated without having a parent span in the context.
1 /**
2 * Flag identifying whether the parent span is required to record a span for XMLHttpRequest requests.
3 */
4 requireParentSpan?: boolean;
ignoreUrls configuration is used to partially cover our project needs: ignore some blacklisted URL paths and all outgoing requests which do not originate from the same application domain. Nevertheless, some of the HTTP requests depending on an application flow can be children of manual browser traces and standalone (these should be ignored). This also increases the cost of maintaining all of the URLs, newly added outgoing calls, and just does not cover the idea of tracking only specific UI actions.
We have also extended xml http instrumentation to ignore parentless spans on our side, although the implementation was impacted by limited extension points.
Nevertheless, fetch instrumentation implementation was not customized: in order to fulfill this requirement on project side it would require to reimplement/copy/maintain whole functionality of the instrumentation.
Is your feature request related to a problem? Please describe.
About our current application setup: both client (NextJS+ReactJS) and a gateway/proxy for BE APIs are running on the same node/domain.
In our project we are using manual browser tracing as well as automatic instrumentations, which track the outgoing requests: Fetch and XmlHttpRequest. In order to avoid spamming the export with unnecessary data, we would like to ignore the automatically created spans which are parentless: requests not originating from manual browser traces, which cover specific UI actions, should be ignored/not recorded.
Describe the solution you'd like
Improve Fetch and XmlHttpRequest automatic instrumentations by adding a configuration option which when set to true would allow to not record the spans that were initiated without having a parent span in the context.
Ignoring/not recording a span could be implemented in a similar manner as for Http instrumentation: opentelemetry-js/http.ts at main · open-telemetry/opentelemetry-js or ignoreUrls functionality.
Describe alternatives you've considered
ignoreUrls configuration is used to partially cover our project needs: ignore some blacklisted URL paths and all outgoing requests which do not originate from the same application domain. Nevertheless, some of the HTTP requests depending on an application flow can be children of manual browser traces and standalone (these should be ignored). This also increases the cost of maintaining all of the URLs, newly added outgoing calls, and just does not cover the idea of tracking only specific UI actions.
We have also extended xml http instrumentation to ignore parentless spans on our side, although the implementation was impacted by limited extension points.
Nevertheless, fetch instrumentation implementation was not customized: in order to fulfill this requirement on project side it would require to reimplement/copy/maintain whole functionality of the instrumentation.
Additional context
Related spec discussion: open-telemetry/opentelemetry-specification#530.
I would like to make a PR for this feature if accepted.
The text was updated successfully, but these errors were encountered: