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.
Files changed (34) hide show
  1. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/PKG-INFO +1 -1
  2. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/opentelemetry_instrument.py +4 -8
  3. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/pyproject.toml +1 -1
  4. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/README.md +0 -0
  5. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/__init__.py +0 -0
  6. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/bootstrappers/__init__.py +0 -0
  7. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/bootstrappers/base.py +0 -0
  8. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/bootstrappers/fastapi.py +0 -0
  9. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/bootstrappers/faststream.py +0 -0
  10. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/bootstrappers/litestar.py +0 -0
  11. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/config/__init__.py +0 -0
  12. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/config/fastapi.py +0 -0
  13. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/config/faststream.py +0 -0
  14. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/config/litestar.py +0 -0
  15. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/console_writer.py +0 -0
  16. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/exceptions.py +0 -0
  17. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/granian_server.py +0 -0
  18. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/helpers.py +0 -0
  19. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/__init__.py +0 -0
  20. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/base.py +0 -0
  21. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/cors_instrument.py +0 -0
  22. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/health_checks_instrument.py +0 -0
  23. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/instrument_box.py +0 -0
  24. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/logging_instrument.py +0 -0
  25. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/prometheus_instrument.py +0 -0
  26. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/pyroscope_instrument.py +0 -0
  27. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/sentry_instrument.py +0 -0
  28. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments/swagger_instrument.py +0 -0
  29. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/instruments_setupper.py +0 -0
  30. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/middlewares/__init__.py +0 -0
  31. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/middlewares/fastapi.py +0 -0
  32. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/middlewares/litestar.py +0 -0
  33. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/py.typed +0 -0
  34. {microbootstrap-1.2.4 → microbootstrap-1.2.5}/microbootstrap/settings.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: microbootstrap
3
- Version: 1.2.4
3
+ Version: 1.2.5
4
4
  Summary: Package for bootstrapping new micro-services
5
5
  Keywords: python,microservice,bootstrap,opentelemetry,logging,error-tracing,litestar,fastapi
6
6
  Author: community-of-python
@@ -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(thread_id, PYROSCOPE_SPAN_ID_KEY, formatted_span_id)
207
- pyroscope.add_thread_tag(thread_id, PYROSCOPE_SPAN_NAME_KEY, span.name)
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
- thread_id: typing.Final = threading.get_ident()
212
- pyroscope.remove_thread_tag(thread_id, PYROSCOPE_SPAN_ID_KEY, format_span_id(span.context.span_id))
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
@@ -56,7 +56,7 @@ dependencies = [
56
56
  "opentelemetry-instrumentation-asgi>=0.46b0",
57
57
  "orjson>=3.10.18",
58
58
  ]
59
- version = "1.2.4"
59
+ version = "1.2.5"
60
60
  authors = [{ name = "community-of-python" }]
61
61
 
62
62
  [project.optional-dependencies]
File without changes