Skip to content

feat(span-streaming): Add more span properties#5421

Merged
sentrivana merged 6 commits intomasterfrom
ivana/span-first/span-op-and-friends
Feb 4, 2026
Merged

feat(span-streaming): Add more span properties#5421
sentrivana merged 6 commits intomasterfrom
ivana/span-first/span-op-and-friends

Conversation

@sentrivana
Copy link
Contributor

@sentrivana sentrivana commented Feb 4, 2026

  • add setters(/getters) or properties for op, source, name, origin, status, feature flags, span_id
  • also, rename name -> _name since it has a getter/setter now

In general regarding this getter/setter business vs. property-based getting and setting: The idiomatic way would be to use properties (e.g. span.name = "name"), but since we can't get around having some getters/setters (e.g. set_attribute, set_flag, etc.), it's probably better to go for consistency and have getters/setters everywhere, even if it's not idiomatic. Otherwise users would have to remember if the specific thing they want to set is a property or has a setter.

The above is about stuff people might want to set, so public API. For internal stuff that no one should be setting by hand (e.g. span_id), we can still go with properties where it makes sense.

Chipping away at #5317.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Codecov Results 📊

13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 7.28s

All tests are passing successfully.

❌ Patch coverage is 48.28%. Project has 13630 uncovered lines.

Files with missing lines (180)
File Patch % Lines
langchain.py 3.28% ⚠️ 590 Missing
utils.py 52.57% ⚠️ 433 Missing and 79 partials
openai.py 5.57% ⚠️ 492 Missing
utils.py 0.00% ⚠️ 479 Missing
__init__.py 5.08% ⚠️ 374 Missing
tracing_utils.py 45.27% ⚠️ 324 Missing and 28 partials
starlette.py 5.34% ⚠️ 337 Missing
scope.py 70.52% ⚠️ 242 Missing and 66 partials
transport.py 23.54% ⚠️ 302 Missing and 2 partials
client.py 55.98% ⚠️ 221 Missing and 56 partials
anthropic.py 9.16% ⚠️ 248 Missing
mcp.py 5.44% ⚠️ 226 Missing
transaction_profiler.py 35.52% ⚠️ 216 Missing and 10 partials
langgraph.py 5.29% ⚠️ 215 Missing
utils.py 16.08% ⚠️ 214 Missing
span_processor.py 0.00% ⚠️ 205 Missing
__init__.py 5.14% ⚠️ 203 Missing
continuous_profiler.py 43.45% ⚠️ 177 Missing and 17 partials
strawberry.py 8.54% ⚠️ 182 Missing
tracing.py 71.37% ⚠️ 136 Missing and 38 partials
aws_lambda.py 16.50% ⚠️ 167 Missing
huggingface_hub.py 8.89% ⚠️ 164 Missing
sanic.py 9.60% ⚠️ 160 Missing
aiohttp.py 10.84% ⚠️ 148 Missing
cloud_resource_context.py 0.00% ⚠️ 145 Missing
ai_client.py 0.00% ⚠️ 145 Missing
rust_tracing.py 0.00% ⚠️ 143 Missing
litellm.py 0.00% ⚠️ 138 Missing
litestar.py 9.59% ⚠️ 132 Missing
starlite.py 8.33% ⚠️ 132 Missing
falcon.py 8.94% ⚠️ 112 Missing
flask.py 12.50% ⚠️ 112 Missing
spotlight.py 28.47% ⚠️ 103 Missing and 8 partials
asgi.py 20.71% ⚠️ 111 Missing
cohere.py 12.70% ⚠️ 110 Missing
agent_run.py 0.00% ⚠️ 110 Missing
asgi.py 0.00% ⚠️ 109 Missing
hub.py 45.60% ⚠️ 105 Missing and 3 partials
envelope.py 54.59% ⚠️ 89 Missing and 17 partials
pymongo.py 10.17% ⚠️ 106 Missing
caching.py 0.00% ⚠️ 106 Missing
utils.py 0.00% ⚠️ 103 Missing
templates.py 0.00% ⚠️ 100 Missing
asyncpg.py 11.61% ⚠️ 99 Missing
quart.py 16.10% ⚠️ 99 Missing
wsgi.py 22.66% ⚠️ 99 Missing
models.py 4.81% ⚠️ 99 Missing
gcp.py 0.00% ⚠️ 98 Missing
otlp.py 0.00% ⚠️ 97 Missing
utils.py 13.39% ⚠️ 97 Missing
sessions.py 27.82% ⚠️ 96 Missing
pyramid.py 13.76% ⚠️ 94 Missing
tornado.py 14.55% ⚠️ 94 Missing
__init__.py 0.00% ⚠️ 93 Missing
bottle.py 11.65% ⚠️ 91 Missing
middleware.py 0.00% ⚠️ 90 Missing
agent_run.py 0.00% ⚠️ 90 Missing
_wsgi_common.py 30.71% ⚠️ 88 Missing and 1 partials
runner.py 0.00% ⚠️ 87 Missing
loguru.py 11.58% ⚠️ 84 Missing
asyncio.py 0.00% ⚠️ 80 Missing
invoke_agent.py 0.00% ⚠️ 79 Missing
session.py 15.56% ⚠️ 76 Missing
clickhouse_driver.py 17.58% ⚠️ 75 Missing
pure_eval.py 0.00% ⚠️ 73 Missing
worker.py 22.58% ⚠️ 72 Missing
ariadne.py 14.46% ⚠️ 71 Missing
gql.py 10.13% ⚠️ 71 Missing
sqlalchemy.py 10.26% ⚠️ 70 Missing
fastapi.py 15.85% ⚠️ 69 Missing
monitoring.py 17.07% ⚠️ 68 Missing
graphene.py 12.82% ⚠️ 68 Missing
transactions.py 0.00% ⚠️ 67 Missing
_queue.py 26.67% ⚠️ 66 Missing
logging.py 66.67% ⚠️ 51 Missing and 15 partials
stdlib.py 60.45% ⚠️ 53 Missing and 11 partials
boto3.py 14.86% ⚠️ 63 Missing
streaming.py 0.00% ⚠️ 62 Missing
httpx.py 16.44% ⚠️ 61 Missing
chalice.py 16.18% ⚠️ 57 Missing
propagator.py 0.00% ⚠️ 57 Missing
server.py 0.00% ⚠️ 56 Missing
spark_driver.py 67.47% ⚠️ 54 Missing and 2 partials
api.py 64.43% ⚠️ 53 Missing
graph_nodes.py 0.00% ⚠️ 52 Missing
gnu_backtrace.py 0.00% ⚠️ 51 Missing
socket.py 0.00% ⚠️ 50 Missing
views.py 0.00% ⚠️ 50 Missing
tools.py 0.00% ⚠️ 49 Missing
_batcher.py 41.25% ⚠️ 47 Missing
invoke_agent.py 0.00% ⚠️ 46 Missing
traces.py 47.06% ⚠️ 45 Missing
_asgi_common.py 16.67% ⚠️ 45 Missing
signals_handlers.py 0.00% ⚠️ 44 Missing
utils.py 22.22% ⚠️ 42 Missing and 1 partials
threading.py 63.16% ⚠️ 35 Missing and 5 partials
client.py 0.00% ⚠️ 40 Missing
serializer.py 84.95% ⚠️ 28 Missing and 10 partials
executing.py 0.00% ⚠️ 38 Missing
client.py 0.00% ⚠️ 38 Missing
_span_batcher.py 35.71% ⚠️ 36 Missing
serverless.py 0.00% ⚠️ 36 Missing
server.py 0.00% ⚠️ 35 Missing
sys_exit.py 0.00% ⚠️ 32 Missing
caches.py 49.15% ⚠️ 30 Missing and 2 partials
launchdarkly.py 0.00% ⚠️ 31 Missing
trytond.py 0.00% ⚠️ 30 Missing
tools.py 0.00% ⚠️ 30 Missing
integration.py 0.00% ⚠️ 30 Missing
error_tracing.py 0.00% ⚠️ 29 Missing
ai_client.py 13.33% ⚠️ 26 Missing
execute_tool.py 0.00% ⚠️ 26 Missing
utils.py 74.67% ⚠️ 19 Missing and 7 partials
scrubber.py 76.81% ⚠️ 16 Missing and 9 partials
_openai_completions_api.py 19.35% ⚠️ 25 Missing
ray.py 70.24% ⚠️ 25 Missing
_werkzeug.py 11.11% ⚠️ 24 Missing
typer.py 0.00% ⚠️ 24 Missing
__init__.py 93.89% ⚠️ 14 Missing and 10 partials
tasks.py 0.00% ⚠️ 24 Missing
_compat.py 41.03% ⚠️ 23 Missing
statsig.py 0.00% ⚠️ 23 Missing
logger.py 43.59% ⚠️ 22 Missing
decorator.py 37.14% ⚠️ 22 Missing
__init__.py 84.78% ⚠️ 14 Missing and 8 partials
_log_batcher.py 0.00% ⚠️ 21 Missing
attachments.py 27.59% ⚠️ 21 Missing
unraisablehook.py 0.00% ⚠️ 21 Missing
__init__.py 8.70% ⚠️ 21 Missing
openfeature.py 0.00% ⚠️ 20 Missing
execute_tool.py 0.00% ⚠️ 20 Missing
dramatiq.py 90.91% ⚠️ 10 Missing and 9 partials
unleash.py 0.00% ⚠️ 19 Missing
_lru_cache.py 43.33% ⚠️ 17 Missing and 1 partials
model_request.py 0.00% ⚠️ 18 Missing
monitor.py 81.97% ⚠️ 11 Missing and 5 partials
beat.py 92.24% ⚠️ 9 Missing and 7 partials
utils.py 0.00% ⚠️ 16 Missing
redis_cluster.py 52.94% ⚠️ 16 Missing
atexit.py 56.25% ⚠️ 14 Missing and 1 partials
excepthook.py 56.25% ⚠️ 14 Missing and 1 partials
feature_flags.py 56.25% ⚠️ 14 Missing
__init__.py 27.78% ⚠️ 13 Missing
types.py 0.00% ⚠️ 12 Missing
_async_common.py 86.27% ⚠️ 7 Missing and 5 partials
_types.py 66.67% ⚠️ 10 Missing
handoff.py 0.00% ⚠️ 10 Missing
_sync_common.py 88.00% ⚠️ 6 Missing and 4 partials
spark_worker.py 89.29% ⚠️ 6 Missing and 4 partials
metrics.py 47.06% ⚠️ 9 Missing
beam.py 94.05% ⚠️ 5 Missing and 3 partials
dedupe.py 85.00% ⚠️ 6 Missing and 2 partials
rq.py 97.44% ⚠️ 2 Missing and 6 partials
_metrics_batcher.py 65.00% ⚠️ 7 Missing
consts.py 0.00% ⚠️ 7 Missing
redis_py_cluster_legacy.py 53.33% ⚠️ 7 Missing
_init_implementation.py 75.00% ⚠️ 6 Missing
_openai_responses_api.py 33.33% ⚠️ 6 Missing
arq.py 97.52% ⚠️ 3 Missing and 3 partials
queries.py 90.32% ⚠️ 3 Missing and 2 partials
debug.py 91.30% ⚠️ 2 Missing and 2 partials
consts.py 0.00% ⚠️ 4 Missing
__init__.py 20.00% ⚠️ 4 Missing
__init__.py 0.00% ⚠️ 4 Missing
__init__.py 89.66% ⚠️ 3 Missing and 1 partials
__init__.py 0.00% ⚠️ 3 Missing
__init__.py 40.00% ⚠️ 3 Missing
__init__.py 0.00% ⚠️ 3 Missing
__init__.py 0.00% ⚠️ 3 Missing
rb.py 70.00% ⚠️ 3 Missing
redis.py 85.00% ⚠️ 3 Missing
consts.py 99.43% ⚠️ 2 Missing
argv.py 100.00% ⚠️ 2 partials
huey.py 100.00% ⚠️ 2 partials
modules.py 94.12% ⚠️ 1 Missing and 1 partials
utils.py 88.24% ⚠️ 2 Missing
agent_workflow.py 71.43% ⚠️ 2 Missing
api.py 100.00% ⚠️ 1 partials
consts.py 0.00% ⚠️ 1 Missing
consts.py 0.00% ⚠️ 1 Missing

Generated by Codecov Action

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Codecov Results 📊

43 passed | Total: 43 | Pass Rate: 100% | Execution Time: 5.38s

All tests are passing successfully.

❌ Patch coverage is 50.00%. Project has 14625 uncovered lines.

Files with missing lines (181)
File Patch % Lines
langchain.py 3.28% ⚠️ 590 Missing
utils.py 52.25% ⚠️ 436 Missing and 84 partials
openai.py 5.57% ⚠️ 492 Missing
utils.py 0.00% ⚠️ 479 Missing
__init__.py 5.08% ⚠️ 374 Missing
starlette.py 5.34% ⚠️ 337 Missing
scope.py 69.31% ⚠️ 252 Missing and 71 partials
tracing_utils.py 53.55% ⚠️ 275 Missing and 46 partials
transport.py 23.29% ⚠️ 303 Missing and 2 partials
client.py 58.57% ⚠️ 208 Missing and 65 partials
mcp.py 4.85% ⚠️ 255 Missing
anthropic.py 9.16% ⚠️ 248 Missing
transaction_profiler.py 35.52% ⚠️ 216 Missing and 10 partials
__init__.py 3.93% ⚠️ 220 Missing
utils.py 16.34% ⚠️ 215 Missing
langgraph.py 5.29% ⚠️ 215 Missing
span_processor.py 0.00% ⚠️ 205 Missing
__init__.py 5.14% ⚠️ 203 Missing
continuous_profiler.py 43.45% ⚠️ 177 Missing and 17 partials
strawberry.py 8.54% ⚠️ 182 Missing
aws_lambda.py 16.50% ⚠️ 167 Missing
spark_driver.py 0.00% ⚠️ 166 Missing
tracing.py 75.16% ⚠️ 118 Missing and 47 partials
huggingface_hub.py 8.89% ⚠️ 164 Missing
sanic.py 9.60% ⚠️ 160 Missing
cloud_resource_context.py 0.00% ⚠️ 145 Missing
ai_client.py 0.00% ⚠️ 145 Missing
rust_tracing.py 0.00% ⚠️ 143 Missing
litellm.py 0.00% ⚠️ 138 Missing
litestar.py 9.59% ⚠️ 132 Missing
starlite.py 8.33% ⚠️ 132 Missing
envelope.py 40.82% ⚠️ 116 Missing and 11 partials
falcon.py 8.94% ⚠️ 112 Missing
flask.py 12.50% ⚠️ 112 Missing
spotlight.py 28.47% ⚠️ 103 Missing and 8 partials
asgi.py 20.71% ⚠️ 111 Missing
cohere.py 12.70% ⚠️ 110 Missing
dramatiq.py 0.00% ⚠️ 110 Missing
agent_run.py 0.00% ⚠️ 110 Missing
arq.py 9.92% ⚠️ 109 Missing
asgi.py 0.00% ⚠️ 109 Missing
hub.py 45.60% ⚠️ 105 Missing and 3 partials
pymongo.py 10.17% ⚠️ 106 Missing
beat.py 8.62% ⚠️ 106 Missing
caching.py 0.00% ⚠️ 106 Missing
utils.py 0.00% ⚠️ 103 Missing
logging.py 35.95% ⚠️ 98 Missing and 3 partials
templates.py 0.00% ⚠️ 100 Missing
asyncpg.py 11.61% ⚠️ 99 Missing
quart.py 16.10% ⚠️ 99 Missing
wsgi.py 22.66% ⚠️ 99 Missing
models.py 4.81% ⚠️ 99 Missing
gcp.py 0.00% ⚠️ 98 Missing
otlp.py 0.00% ⚠️ 97 Missing
utils.py 13.39% ⚠️ 97 Missing
pyramid.py 13.76% ⚠️ 94 Missing
tornado.py 14.55% ⚠️ 94 Missing
__init__.py 0.00% ⚠️ 93 Missing
bottle.py 11.65% ⚠️ 91 Missing
middleware.py 0.00% ⚠️ 90 Missing
agent_run.py 0.00% ⚠️ 90 Missing
_wsgi_common.py 32.28% ⚠️ 86 Missing and 2 partials
runner.py 0.00% ⚠️ 87 Missing
beam.py 0.00% ⚠️ 84 Missing
loguru.py 11.58% ⚠️ 84 Missing
ray.py 0.00% ⚠️ 84 Missing
asyncio.py 0.00% ⚠️ 80 Missing
invoke_agent.py 0.00% ⚠️ 79 Missing
clickhouse_driver.py 17.58% ⚠️ 75 Missing
pure_eval.py 0.00% ⚠️ 73 Missing
worker.py 22.58% ⚠️ 72 Missing
ariadne.py 14.46% ⚠️ 71 Missing
gql.py 10.13% ⚠️ 71 Missing
sqlalchemy.py 10.26% ⚠️ 70 Missing
fastapi.py 15.85% ⚠️ 69 Missing
monitoring.py 17.07% ⚠️ 68 Missing
graphene.py 12.82% ⚠️ 68 Missing
transactions.py 0.00% ⚠️ 67 Missing
_queue.py 26.67% ⚠️ 66 Missing
rq.py 15.38% ⚠️ 66 Missing
huey.py 17.72% ⚠️ 65 Missing
sessions.py 59.40% ⚠️ 54 Missing and 10 partials
boto3.py 14.86% ⚠️ 63 Missing
utils.py 16.00% ⚠️ 63 Missing
streaming.py 0.00% ⚠️ 62 Missing
httpx.py 16.44% ⚠️ 61 Missing
api.py 59.73% ⚠️ 60 Missing
stdlib.py 61.19% ⚠️ 52 Missing and 8 partials
chalice.py 16.18% ⚠️ 57 Missing
propagator.py 0.00% ⚠️ 57 Missing
serializer.py 77.42% ⚠️ 42 Missing and 14 partials
server.py 0.00% ⚠️ 56 Missing
spark_worker.py 0.00% ⚠️ 56 Missing
graph_nodes.py 0.00% ⚠️ 52 Missing
gnu_backtrace.py 0.00% ⚠️ 51 Missing
_async_common.py 0.00% ⚠️ 51 Missing
socket.py 0.00% ⚠️ 50 Missing
views.py 0.00% ⚠️ 50 Missing
tools.py 0.00% ⚠️ 49 Missing
caches.py 16.95% ⚠️ 49 Missing
_batcher.py 41.25% ⚠️ 47 Missing
invoke_agent.py 0.00% ⚠️ 46 Missing
_asgi_common.py 16.67% ⚠️ 45 Missing
traces.py 47.62% ⚠️ 44 Missing
signals_handlers.py 0.00% ⚠️ 44 Missing
utils.py 22.22% ⚠️ 42 Missing and 1 partials
threading.py 62.11% ⚠️ 36 Missing and 6 partials
client.py 0.00% ⚠️ 40 Missing
_sync_common.py 22.00% ⚠️ 39 Missing
executing.py 0.00% ⚠️ 38 Missing
client.py 0.00% ⚠️ 38 Missing
session.py 73.33% ⚠️ 24 Missing and 13 partials
_span_batcher.py 35.71% ⚠️ 36 Missing
serverless.py 0.00% ⚠️ 36 Missing
server.py 0.00% ⚠️ 35 Missing
sys_exit.py 0.00% ⚠️ 32 Missing
launchdarkly.py 0.00% ⚠️ 31 Missing
trytond.py 0.00% ⚠️ 30 Missing
tools.py 0.00% ⚠️ 30 Missing
integration.py 0.00% ⚠️ 30 Missing
error_tracing.py 0.00% ⚠️ 29 Missing
ai_client.py 13.33% ⚠️ 26 Missing
execute_tool.py 0.00% ⚠️ 26 Missing
_openai_completions_api.py 19.35% ⚠️ 25 Missing
aiohttp.py 91.57% ⚠️ 14 Missing and 11 partials
redis_cluster.py 26.47% ⚠️ 25 Missing
_werkzeug.py 11.11% ⚠️ 24 Missing
typer.py 0.00% ⚠️ 24 Missing
tasks.py 0.00% ⚠️ 24 Missing
_compat.py 41.03% ⚠️ 23 Missing
__init__.py 84.78% ⚠️ 14 Missing and 9 partials
statsig.py 0.00% ⚠️ 23 Missing
queries.py 25.81% ⚠️ 23 Missing
logger.py 43.59% ⚠️ 22 Missing
scrubber.py 85.51% ⚠️ 10 Missing and 12 partials
decorator.py 37.14% ⚠️ 22 Missing
_log_batcher.py 0.00% ⚠️ 21 Missing
attachments.py 27.59% ⚠️ 21 Missing
monitor.py 68.85% ⚠️ 19 Missing and 2 partials
unraisablehook.py 0.00% ⚠️ 21 Missing
__init__.py 8.70% ⚠️ 21 Missing
openfeature.py 0.00% ⚠️ 20 Missing
execute_tool.py 0.00% ⚠️ 20 Missing
unleash.py 0.00% ⚠️ 19 Missing
_lru_cache.py 43.33% ⚠️ 17 Missing and 1 partials
model_request.py 0.00% ⚠️ 18 Missing
utils.py 0.00% ⚠️ 16 Missing
atexit.py 56.25% ⚠️ 14 Missing and 1 partials
excepthook.py 56.25% ⚠️ 14 Missing and 1 partials
redis.py 25.00% ⚠️ 15 Missing
feature_flags.py 56.25% ⚠️ 14 Missing
_init_implementation.py 45.83% ⚠️ 13 Missing
dedupe.py 77.50% ⚠️ 9 Missing and 4 partials
__init__.py 27.78% ⚠️ 13 Missing
_types.py 60.00% ⚠️ 12 Missing
types.py 0.00% ⚠️ 12 Missing
redis_py_cluster_legacy.py 26.67% ⚠️ 11 Missing
api.py 37.50% ⚠️ 10 Missing
utils.py 41.18% ⚠️ 10 Missing
handoff.py 0.00% ⚠️ 10 Missing
metrics.py 47.06% ⚠️ 9 Missing
__init__.py 72.41% ⚠️ 8 Missing and 1 partials
_metrics_batcher.py 65.00% ⚠️ 7 Missing
consts.py 0.00% ⚠️ 7 Missing
rb.py 30.00% ⚠️ 7 Missing
_openai_responses_api.py 33.33% ⚠️ 6 Missing
debug.py 91.30% ⚠️ 2 Missing and 2 partials
consts.py 0.00% ⚠️ 4 Missing
__init__.py 20.00% ⚠️ 4 Missing
__init__.py 0.00% ⚠️ 4 Missing
__init__.py 0.00% ⚠️ 3 Missing
__init__.py 40.00% ⚠️ 3 Missing
__init__.py 0.00% ⚠️ 3 Missing
__init__.py 0.00% ⚠️ 3 Missing
__init__.py 0.00% ⚠️ 3 Missing
consts.py 99.43% ⚠️ 2 Missing
argv.py 100.00% ⚠️ 2 partials
modules.py 94.12% ⚠️ 1 Missing and 1 partials
agent_workflow.py 71.43% ⚠️ 2 Missing
consts.py 0.00% ⚠️ 1 Missing
consts.py 0.00% ⚠️ 1 Missing

Generated by Codecov Action

@sentrivana sentrivana marked this pull request as ready for review February 4, 2026 13:13
@sentrivana sentrivana requested a review from a team as a code owner February 4, 2026 13:13
return self.value


# Segment source, see
Copy link
Contributor Author

@sentrivana sentrivana Feb 4, 2026

Choose a reason for hiding this comment

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

This source related stuff is all just copied from the old TransactionSource and will be used by integrations and DSC later.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

# These are typically high cardinality and the server hates them
LOW_QUALITY_SEGMENT_SOURCES = [
SegmentSource.URL,
]
Copy link

Choose a reason for hiding this comment

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

Unused constant LOW_QUALITY_SEGMENT_SOURCES is dead code

Low Severity

LOW_QUALITY_SEGMENT_SOURCES is defined but never used anywhere in the codebase. A similar constant LOW_QUALITY_TRANSACTION_SOURCES exists in tracing.py and is actively used. This appears to be scaffolding code that isn't yet integrated.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Coming soon (tm)

Copy link
Contributor

@alexander-alderman-webb alexander-alderman-webb left a comment

Choose a reason for hiding this comment

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

LGTM!

but since we can't get around having some getters/setters

Out of curiosity, why is this the case?

@sentrivana
Copy link
Contributor Author

sentrivana commented Feb 4, 2026

but since we can't get around having some getters/setters

Out of curiosity, why is this the case?

If you take span attributes for instance: there's no nice property-based way to set a single attribute, which is functionality that we definitely need as public API. You could allow access to the whole attributes dictionary of a span and allow folks to do something like span.attributes["my_attribute"] = "my_value" directly, but then it'd get ugly once you wanted to add extra logic to setting an attribute, like the pre-serializing we're doing currently. So the whole attributes API kinda has to be getter/setter based. Similarly with something like set_flag("flag.name", True).

For simple, single-value stuff like name, status etc., properties would work fine, but this sort of collection-based data like attributes and flags don't really work well without getters/setters, or at least I don't see a good way.

@sentrivana sentrivana merged commit 3373da2 into master Feb 4, 2026
155 checks passed
@sentrivana sentrivana deleted the ivana/span-first/span-op-and-friends branch February 4, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants