Skip to content

feat(pyreqwest): Support span streaming - #6455

Merged
alexander-alderman-webb merged 10 commits into
masterfrom
webb/pyreqwest/span-first
Jun 2, 2026
Merged

feat(pyreqwest): Support span streaming#6455
alexander-alderman-webb merged 10 commits into
masterfrom
webb/pyreqwest/span-first

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Description

In the streaming path, use

  • code.filepath instead of code.file.path
  • code.line.number instead of code.lineno
  • url.full instead of url
  • url.query instead of http.query
  • url.fragment instead of http.fragment
  • http.request.method instead of http.method

Adapting Tests

sed commands used for converting transaction context managers:

  • sed -i '' 's/with start_transaction(name="test_transaction"):/with sentry_sdk.traces.start_span(name="custom parent"):/g'

sed commands used for converting specific attributes:

  • sed -i '' 's/CODE_LINENO/CODE_LINE_NUMBER/g'
  • sed -i '' 's/CODE_FILEPATH/CODE_FILE_PATH/g'
  • sed -i '' 's/["url"]/["url.full"]/g'
  • sed -i '' 's/HTTP_QUERY/URL_QUERY/g
  • sed -i '' 's/HTTP_FRAGMENT/URL_FRAGMENT/g'

sed commands used for converting event capture:

  • sed -i '' 's/event["spans"]/spans/g'
  • sed -i '' 's/(event,) = events/spans = [item.payload for item in items if item.type == "span"]/g'
  • sed -i '' 's/events = capture_events()/items = capture_items("event", "transaction", "span")/g'
  • sed -i '' 's/capture_events,/capture_items,/g'

sed commands used for converting op:

  • sed -i '' 's/["op"]/["attributes"]["sentry.op"]/g'

sed commands used for converting origin:

  • sed -i '' 's/["origin"]/["attributes"]["sentry.origin"]/g'

sed commands used for converting description:

  • sed -i '' 's/["description"]/["name"]/g'

sed commands used for converting data to attributes:

  • sed -i '' 's/["data"]/["attributes"]/g'

other test changes:

  • sed -i '' 's/assert len(spans) == 1/assert len(spans) == 2/g'

Issues

Reminders

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants