-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Python open beta for autocomplete and search (#25480)
* Add Python open beta for autocomplete and search * Apply suggestions from code review Co-authored-by: Gabriele N. Tornetta <[email protected]> * Apply suggestions from code review Co-authored-by: Sandra (neko) <[email protected]> * Fix list indentation * Update content/en/dynamic_instrumentation/symdb/python.md Co-authored-by: Sandra (neko) <[email protected]> --------- Co-authored-by: Gabriele N. Tornetta <[email protected]> Co-authored-by: Sandra (neko) <[email protected]>
- Loading branch information
1 parent
4d1c21b
commit bc482c6
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
title: Enable Autocomplete and Search for Python | ||
is_beta: true | ||
private: false | ||
code_lang: python | ||
type: multi-code-lang | ||
code_lang_weight: 10 | ||
--- | ||
{{< beta-callout url="#" btn_hidden="true" >}} | ||
Autocomplete and search are in public beta. | ||
{{< /beta-callout >}} | ||
|
||
## Requirements | ||
|
||
- [Dynamic Instrumentation][1] is enabled for your service. | ||
- Tracing library [`dd-trace-py`][6] 2.9.0 or higher is installed. | ||
|
||
## Installation | ||
|
||
Run your service with Dynamic Instrumentation enabled, and additionally enable autocomplete and search: | ||
|
||
1. Run your service with Dynamic Instrumentation enabled by setting the `DD_DYNAMIC_INSTRUMENTATION_ENABLED` environment variable to `true`. | ||
2. Specify `DD_SERVICE` and `DD_VERSION` [Unified Service Tags][5]. | ||
3. Invoke your service: | ||
|
||
```shell | ||
export DD_SERVICE=<YOUR_SERVICE> | ||
export DD_ENV=<YOUR_ENV> | ||
export DD_VERSION=<YOUR_VERSION> | ||
export DD_DYNAMIC_INSTRUMENTATION_ENABLED=true | ||
export DD_SYMBOL_DATABASE_UPLOAD_ENABLED=true | ||
ddtrace-run python -m myapp | ||
``` | ||
|
||
After starting your service with the required features enabled, you can use Dynamic Instrumentation's IDE-like features on the [**APM** > **Dynamic Instrumentation**][4] page. | ||
|
||
## Additional configuration | ||
|
||
### Third party detection | ||
|
||
If autocomplete suggestions do not appear for your package or module, it may be incorrectly recognized as third-party code. The autocomplete and search features use a heuristic to filter out third-party code, which can sometimes lead to accidental misclassification. | ||
|
||
To ensure that your code is properly recognized, and to enable accurate autocomplete and search functionality, configure your third-party detection settings to use the following options: | ||
|
||
``` | ||
export DD_THIRD_PARTY_DETECTION_EXCLUDES=<LIST_OF_USER_CODE_MODULES> | ||
export DD_THIRD_PARTY_DETECTION_INCLUDES=<LIST_OF_ADDITIONAL_THIRD_PARTY_MODULES> | ||
``` | ||
|
||
where `<LIST_OF_USER_CODE_MODULES>` and `<LIST_OF_ADDITIONAL_THIRD_PARTY_MODULES>` are comma separated lists of package prefixes. For example: | ||
|
||
``` | ||
export DD_THIRD_PARTY_DETECTION_EXCLUDES=shopping,database | ||
``` | ||
|
||
[1]: /dynamic_instrumentation | ||
[4]: https://app.datadoghq.com/dynamic-instrumentation | ||
[5]: /getting_started/tagging/unified_service_tagging | ||
[6]: https://github.com/DataDog/dd-trace-py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters