Skip to content

Commit

Permalink
feat(symdb): enable by default
Browse files Browse the repository at this point in the history
We make Symbol Database enabled by default.
  • Loading branch information
P403n1x87 committed Feb 7, 2025
1 parent f8d4820 commit 1733cc0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
13 changes: 6 additions & 7 deletions ddtrace/contrib/internal/aiohttp/middlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,9 @@ async def on_prepare(request, response):
the trace middleware execution.
"""
# NB isinstance is not appropriate here because StreamResponse is a parent of the other
# aiohttp response types. However in some cases this can also lead to missing the closing of
# spans, leading to a memory leak, which is why we have this flag.
# todo: this is a temporary fix for a memory leak in aiohttp. We should find a way to
# consistently close spans with the correct timing.
if not config.aiohttp["disable_stream_timing_for_mem_leak"]:
if type(response) is web.StreamResponse and not response.task.done():
return
# aiohttp response types
if type(response) is web.StreamResponse and not response.task.done():
return
finish_request_span(request, response)


Expand Down Expand Up @@ -169,6 +165,9 @@ def trace_app(app, tracer, service="aiohttp-web"):
"analytics_sample_rate": 1.0,
}

# the tracer must work with asynchronous Context propagation
tracer._configure(context_provider=context_provider)

# add the async tracer middleware as a first middleware
# and be sure that the on_prepare signal is the last one
app.middlewares.insert(0, trace_middleware)
Expand Down
2 changes: 1 addition & 1 deletion ddtrace/settings/symbol_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class SymbolDatabaseConfig(En):
enabled = En.v(
bool,
"upload_enabled",
default=False,
default=True,
help_type="Boolean",
help="Whether to upload source code symbols to the Datadog backend",
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
features:
- |
Symbol Database is now enabled by default.
2 changes: 1 addition & 1 deletion tests/telemetry/test_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def test_app_started_event_configuration_override(test_agent_session, run_python
"value": str(file),
},
{"name": "DD_SYMBOL_DATABASE_INCLUDES", "origin": "default", "value": "set()"},
{"name": "DD_SYMBOL_DATABASE_UPLOAD_ENABLED", "origin": "default", "value": False},
{"name": "DD_SYMBOL_DATABASE_UPLOAD_ENABLED", "origin": "default", "value": True},
{"name": "DD_TAGS", "origin": "env_var", "value": "team:apm,component:web"},
{"name": "DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED", "origin": "default", "value": True},
{"name": "DD_TELEMETRY_HEARTBEAT_INTERVAL", "origin": "default", "value": 60},
Expand Down

0 comments on commit 1733cc0

Please sign in to comment.