-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inferred service for auto injection #9376
base: main
Are you sure you want to change the base?
Conversation
from unittest.mock import MagicMock, patch, mock_open | ||
from pathlib import Path | ||
import psutil | ||
import toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend vendoring the toml
library instead of adding it as an installation dependency. It's important to limit the number of installation dependencies to keep the customer onboarding process as simple as it can be.
ddtrace/contrib/trace_utils.py
Outdated
@@ -371,12 +372,15 @@ def int_service(pin, int_config, default=None): | |||
return cast(str, int_config.service_name) | |||
|
|||
global_service = int_config.global_config._get_service() | |||
if global_service: | |||
if global_service and global_service != DEFAULT_SERVICE_NAME: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic seems like it might be more complex than necessary. I think using DEFAULT_SERVICE_NAME
as a sentinel in this way is prone to future bugs. Imagine what happens when int_config.global_config._get_service()
changes to default to something other than DEFAULT_SERVICE_NAME
. This code would start to behave in a confusing way.
Datadog ReportBranch report: ❌ 874 Failed (6 Known Flaky), 130072 Passed, 42839 Skipped, 6h 9m 36.12s Total duration (3h 42m 30.8s time saved) ❌ Failed Tests (874)
New Flaky Tests (6)
⌛ Performance Regressions vs Default Branch (1)
|
3ad0c21
to
db6eb5a
Compare
Datadog ReportBranch report: ❌ 1800 Failed (14 Known Flaky), 161852 Passed, 1452 Skipped, 7h 19m 55.23s Total duration (3m 29.26s time saved) ❌ Failed Tests (1800)
New Flaky Tests (65)
|
BenchmarksBenchmark execution time: 2024-06-25 18:22:13 Comparing candidate commit 2872776 in PR branch Found 2 performance improvements and 1 performance regressions! Performance is the same for 218 metrics, 9 unstable metrics. scenario:otelspan-start
scenario:span-add-metrics
scenario:span-add-tags
|
7ec5828
to
cca3c5b
Compare
Questions:
|
Description
This PR adds another layer to service naming. Instead of defaulting to
unnamed-python-service
when noDD_SERVICE
or programatic service name was provided, this change attempts to find a package or module name.The algo:
unnamed-python-service
.Checklist
changelog/no-changelog
is set@DataDog/apm-tees
.Reviewer Checklist