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

Otel metrics error when using api calls #27

Open
Umaaz opened this issue Feb 5, 2024 · 0 comments
Open

Otel metrics error when using api calls #27

Umaaz opened this issue Feb 5, 2024 · 0 comments

Comments

@Umaaz
Copy link
Member

Umaaz commented Feb 5, 2024

Describe the bug
The error below is given when using the api to create tracepoints (_deep.register_tracepoint("simple_test.py", 41, metrics=[MetricDefinition("uuid_length", "histogram")])

2024-02-05 18:19:15,907 - deep - ERROR - Error registering metric histogram deep_uuid_length
Traceback (most recent call last):
  File "/home/bdonnell/repo/github/intergral/test-app-python/venv/lib/python3.10/site-packages/deep/api/plugin/metric/otel_metrics.py", line 107, in histogram
    histogram = self.__check_cache(name, 'histogram',
  File "/home/bdonnell/repo/github/intergral/test-app-python/venv/lib/python3.10/site-packages/deep/api/plugin/metric/otel_metrics.py", line 47, in __check_cache
    default = from_default()
  File "/home/bdonnell/repo/github/intergral/test-app-python/venv/lib/python3.10/site-packages/deep/api/plugin/metric/otel_metrics.py", line 108, in <lambda>
    lambda: get_meter('deep').create_histogram(f'{namespace}_{name}', unit,
  File "/home/bdonnell/repo/github/intergral/test-app-python/venv/lib/python3.10/site-packages/opentelemetry/sdk/metrics/_internal/__init__.py", line 193, in create_histogram
    ) = self._is_instrument_registered(name, _Histogram, unit, description)
  File "/home/bdonnell/repo/github/intergral/test-app-python/venv/lib/python3.10/site-packages/opentelemetry/metrics/_internal/__init__.py", line 225, in _is_instrument_registered
    instrument_id = ",".join(
TypeError: sequence item 2: expected str instance, NoneType found

To Reproduce
Steps to reproduce the behavior:

  1. Use the api deep.register_tracepoint to create a metric with just a name a type.
  2. See error

Expected behavior
A metric should be created with default values.

Desktop (please complete the following information):

  • Python Version [e.g. cpython 3.12] cpython 3.10.12

Additional context
Add any other context about the problem here.

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

1 participant