-
Notifications
You must be signed in to change notification settings - Fork 250
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
Use default registry when prometheus_multiproc_dir
is set
#273
Open
Bentechy66
wants to merge
1
commit into
korfuri:master
Choose a base branch
from
Bentechy66:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
This should allow custom metrics to be used (unless I've missed something)
this fail with: django.request:ERROR:: Internal Server Error: /metrics
Traceback (most recent call last):
File ".../env/lib/python3.7/site-packages/asgiref/sync.py", line 458, in thread_handler
raise exc_info[1]
File ".../env/lib/python3.7/site-packages/django/core/handlers/exception.py", line 38, in inner
response = await get_response(request)
File ".../env/lib/python3.7/site-packages/django/core/handlers/base.py", line 233, in _get_response_async
response = await wrapped_callback(request, *callback_args, **callback_kwargs)
File ".../env/lib/python3.7/site-packages/asgiref/sync.py", line 423, in __call__
ret = await asyncio.wait_for(future, timeout=None)
File "/usr/lib/python3.7/asyncio/tasks.py", line 414, in wait_for
return await fut
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File ".../env/lib/python3.7/site-packages/asgiref/sync.py", line 462, in thread_handler
return func(*args, **kwargs)
File ".../env/lib/python3.7/site-packages/sentry_sdk/integrations/django/views.py", line 67, in sentry_wrapped_callback
return callback(request, *args, **kwargs)
File ".../env/lib/python3.7/site-packages/django_prometheus/exports.py", line 122, in ExportToDjangoView
multiprocess.MultiProcessCollector(registry)
File ".../env/lib/python3.7/site-packages/prometheus_client/multiprocess.py", line 36, in __init__
registry.register(self)
File ".../env/lib/python3.7/site-packages/prometheus_client/registry.py", line 31, in register
duplicates))
ValueError: Duplicated timeseries in CollectorRegistry: {'django_http_ajax_requests_created', 'django_http_responses_streaming_created', 'django_http_responses_streaming_total', 'django_http_requests_before_middlewares_created', 'django_http_responses_total_by_templatename', 'django_http_responses_body_total_bytes_count', 'django_http_exceptions_total_by_view_total', 'django_http_requests_total_by_method', 'django_http_requests_unknown_latency_total', 'django_http_responses_before_middlewares', 'django_http_responses_body_total_bytes_sum', 'django_http_responses_total_by_templatename_created', 'django_http_responses_total_by_status_view_method_total', 'django_http_requests_latency_including_middlewares_seconds_sum', 'django_http_requests_unknown_latency', 'django_http_responses_body_total_bytes_bucket', 'django_http_requests_latency_including_middlewares_seconds_created', 'django_http_requests_total_by_method_total', 'django_http_responses_total_by_status_view_method_created', 'django_http_requests_latency_seconds_by_view_method_bucket', 'django_http_requests_body_total_bytes_bucket', 'django_http_exceptions_total_by_type_total', 'django_http_requests_total_by_view_transport_method', 'django_http_requests_before_middlewares_total', 'django_http_requests_unknown_latency_including_middlewares', 'django_http_responses_body_total_bytes', 'django_http_requests_total_by_method_created', 'django_http_responses_body_total_bytes_created', 'django_http_requests_body_total_bytes_sum', 'django_http_requests_latency_seconds_by_view_method_sum', 'django_http_responses_before_middlewares_created', 'django_http_ajax_requests', 'django_http_responses_total_by_status_view_method', 'django_http_requests_unknown_latency_including_middlewares_total', 'django_http_requests_unknown_latency_including_middlewares_created', 'django_http_requests_total_by_view_transport_method_total', 'django_http_responses_total_by_status_created', 'django_http_requests_latency_seconds_by_view_method_created', 'django_http_exceptions_total_by_type', 'django_http_exceptions_total_by_view_created', 'django_http_requests_total_by_transport', 'django_http_responses_streaming', 'django_http_requests_body_total_bytes', 'django_http_responses_total_by_charset_created', 'django_http_requests_total_by_transport_total', 'django_http_requests_body_total_bytes_created', 'django_http_requests_latency_including_middlewares_seconds', 'django_http_requests_unknown_latency_created', 'django_http_responses_total_by_status_total', 'django_http_responses_total_by_charset_total', 'django_http_requests_before_middlewares', 'django_http_responses_total_by_templatename_total', 'django_http_requests_latency_including_middlewares_seconds_bucket', 'django_http_requests_latency_seconds_by_view_method_count', 'django_http_exceptions_total_by_type_created', 'django_http_responses_total_by_status', 'django_http_requests_latency_including_middlewares_seconds_count', 'django_http_responses_before_middlewares_total', 'django_http_requests_total_by_transport_created', 'django_http_exceptions_total_by_view', 'django_http_requests_latency_seconds_by_view_method', 'django_http_requests_total_by_view_transport_method_created', 'django_http_requests_body_total_bytes_count', 'django_http_ajax_requests_total', 'django_http_responses_total_by_charset'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should allow custom collectors to be used when this envvar is set (see #271) (unless I've missed something and they can already)