getsentry / getsentry/sentry-javascript

Extension of shouldCreateSpanForRequest to cover usual cases

Open
#10,638 1 comment 0 reactions 0 assignees View on GitHub
Improvement Node.js
Dominant language
TypeScript
Stars
8.7k
Forks
1.8k
Avg merge
1d 17h
Merged PRs (30d)
515

Description

### Problem Statement

Right now the `shouldCreateSpanForRequest` callback could be helpful to distinguish between API endpoints and decide whether a request should be decorated with the distributed tracing headers. Besides just having the URL at hand to make a decision, it would be helpful to provide some more request specific information – especially the HTTP method. That would help to only send the tracing headers to API methods that could deal with those.

### Solution Brainstorm

Extend the `shouldCreateSpanForRequest` by an additional parameter providing at least the HTTP method.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.