Skip to content
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

Include's overlap check causes issues with ddtrace #40

Closed
alejandrodnm opened this issue Oct 22, 2024 · 1 comment
Closed

Include's overlap check causes issues with ddtrace #40

alejandrodnm opened this issue Oct 22, 2024 · 1 comment

Comments

@alejandrodnm
Copy link

In #38 the following code was moved down.

https://github.com/DataDog/envier/pull/38/files#diff-328fcc831dd05af9986a37698ee9efaf88254ada077ef48a999221e6fe0551a5L374-L381

The problem is that overlap is checked against the global values, instead of being scoped to namespace.

This causes an issue with ddtracer

https://github.com/DataDog/dd-trace-py/blob/50b335982edd0fc283efc8f416f7f4bb32548f04/ddtrace/settings/profiling.py#L415-L419

Because all the stacks have an enabled attribute.

  File "/Users/adn/dev/timescale/lambda-pg-vectorizer/.venv/lib/python3.12/site-packages/ddtrace/internal/telemetry/__init__.py", line 6, in <module>
    from .writer import TelemetryWriter
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "/Users/adn/dev/timescale/lambda-pg-vectorizer/.venv/lib/python3.12/site-packages/ddtrace/internal/module.py", line 295, in _exec_module
    self.loader.exec_module(module)
  File "/Users/adn/dev/timescale/lambda-pg-vectorizer/.venv/lib/python3.12/site-packages/_pytest/assertion/rewrite.py", line 184, in exec_module
    exec(co, module.__dict__)
  File "/Users/adn/dev/timescale/lambda-pg-vectorizer/.venv/lib/python3.12/site-packages/ddtrace/internal/telemetry/writer.py", line 27, in <module>
    from ...settings.profiling import config as prof_config
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "/Users/adn/dev/timescale/lambda-pg-vectorizer/.venv/lib/python3.12/site-packages/ddtrace/internal/module.py", line 295, in _exec_module
    self.loader.exec_module(module)
  File "/Users/adn/dev/timescale/lambda-pg-vectorizer/.venv/lib/python3.12/site-packages/_pytest/assertion/rewrite.py", line 184, in exec_module
    exec(co, module.__dict__)
  File "/Users/adn/dev/timescale/lambda-pg-vectorizer/.venv/lib/python3.12/site-packages/ddtrace/settings/profiling.py", line 415, in <module>
    ProfilingConfig.include(ProfilingConfigStack, namespace="stack")
  File "/Users/adn/dev/timescale/lambda-pg-vectorizer/.venv/lib/python3.12/site-packages/envier/env.py", line 422, in include
    raise ValueError("Configuration clashes detected: {}".format(overlap))
ValueError: Configuration clashes detected: {'enabled'}
@alejandrodnm alejandrodnm changed the title Removal of namespace in include causes issues with ddtrace Include overlap check causes issues with ddtrace Oct 22, 2024
@alejandrodnm alejandrodnm changed the title Include overlap check causes issues with ddtrace Include's overlap check causes issues with ddtrace Oct 22, 2024
@P403n1x87
Copy link
Collaborator

Thanks for reporting this. This was fixed in #39.

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

No branches or pull requests

2 participants