microbootstrap 1.2.4__tar.gz → 1.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/PKG-INFO +1 -1
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/opentelemetry_instrument.py +4 -8
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/pyproject.toml +1 -1
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/README.md +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/__init__.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/bootstrappers/__init__.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/bootstrappers/base.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/bootstrappers/fastapi.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/bootstrappers/faststream.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/bootstrappers/litestar.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/config/__init__.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/config/fastapi.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/config/faststream.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/config/litestar.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/console_writer.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/exceptions.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/granian_server.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/helpers.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/__init__.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/base.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/cors_instrument.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/health_checks_instrument.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/instrument_box.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/logging_instrument.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/prometheus_instrument.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/pyroscope_instrument.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/sentry_instrument.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/swagger_instrument.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments_setupper.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/middlewares/__init__.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/middlewares/fastapi.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/middlewares/litestar.py +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/py.typed +0 -0
- {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/settings.py +0 -0
{microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/opentelemetry_instrument.py
RENAMED
|
@@ -2,7 +2,6 @@ from __future__ import annotations
|
|
|
2
2
|
import dataclasses
|
|
3
3
|
import logging
|
|
4
4
|
import os
|
|
5
|
-
import threading
|
|
6
5
|
import typing
|
|
7
6
|
|
|
8
7
|
import pydantic
|
|
@@ -200,17 +199,14 @@ class PyroscopeSpanProcessor(SpanProcessor):
|
|
|
200
199
|
def on_start(self, span: Span, parent_context: Context | None = None) -> None: # noqa: ARG002
|
|
201
200
|
if _is_root_span(span):
|
|
202
201
|
formatted_span_id: typing.Final = format_span_id(span.context.span_id)
|
|
203
|
-
thread_id: typing.Final = threading.get_ident()
|
|
204
|
-
|
|
205
202
|
span.set_attribute(OTEL_PROFILE_ID_KEY, formatted_span_id)
|
|
206
|
-
pyroscope.add_thread_tag(
|
|
207
|
-
pyroscope.add_thread_tag(
|
|
203
|
+
pyroscope.add_thread_tag(PYROSCOPE_SPAN_ID_KEY, formatted_span_id)
|
|
204
|
+
pyroscope.add_thread_tag(PYROSCOPE_SPAN_NAME_KEY, span.name)
|
|
208
205
|
|
|
209
206
|
def on_end(self, span: ReadableSpan) -> None:
|
|
210
207
|
if _is_root_span(span):
|
|
211
|
-
|
|
212
|
-
pyroscope.remove_thread_tag(
|
|
213
|
-
pyroscope.remove_thread_tag(thread_id, PYROSCOPE_SPAN_NAME_KEY, span.name)
|
|
208
|
+
pyroscope.remove_thread_tag(PYROSCOPE_SPAN_ID_KEY, format_span_id(span.context.span_id))
|
|
209
|
+
pyroscope.remove_thread_tag(PYROSCOPE_SPAN_NAME_KEY, span.name)
|
|
214
210
|
|
|
215
211
|
def force_flush(self, timeout_millis: int = 30000) -> bool: # noqa: ARG002 # pragma: no cover
|
|
216
212
|
return True
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/health_checks_instrument.py
RENAMED
|
File without changes
|
|
File without changes
|
{microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/logging_instrument.py
RENAMED
|
File without changes
|
{microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/prometheus_instrument.py
RENAMED
|
File without changes
|
{microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/pyroscope_instrument.py
RENAMED
|
File without changes
|
{microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/sentry_instrument.py
RENAMED
|
File without changes
|
{microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/swagger_instrument.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|