Skip to content

Conversation

@mrstork
Copy link
Contributor

@mrstork mrstork commented Nov 26, 2025

This allows an active span to be passed in allowing custom attributes to be set on spans before they are closed

Alternative solutions considered before settling on this one:

  • Passing in extra attributes as options: falls short when the attributes need to be set before vs after the blob request. Quickly calls out for some sort of beforeAttributes and afterAttributes pattern which feels quite messy.
  • Computed attributes: gets messy real fast and there's a high chance of causing a promise loop
  • Handing off request completion or span completion to the consumer: leaky abstraction - the purpose of the api is blobs not traces

"removeComments": false,
"strict": true,
"moduleResolution": "node",
"moduleResolution": "nodenext",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to support import from @netlify/otel/opentelemetry

@mrstork mrstork marked this pull request as ready for review December 3, 2025 15:51
@mrstork mrstork requested a review from a team as a code owner December 3, 2025 15:51
@mrstork mrstork merged commit ba74c4a into main Dec 3, 2025
41 of 45 checks passed
@mrstork mrstork deleted the allow-span-option branch December 3, 2025 18:19
@token-generator-app token-generator-app bot mentioned this pull request Dec 3, 2025
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.

3 participants