gl-observability-binary 0.0.0b1__cp311-cp311-win_amd64.whl → 0.1.0__cp311-cp311-win_amd64.whl

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.
@@ -1,4 +1,6 @@
1
- from gl_observability.backend import OpenTelemetryConfig as OpenTelemetryConfig, SentryConfig as SentryConfig
2
1
  from gl_observability.initializer import TelemetryConfig as TelemetryConfig, init_telemetry as init_telemetry
2
+ from gl_observability.traces.backend.opentelemetry import OpenTelemetryBackendConfig as OpenTelemetryBackendConfig
3
+ from gl_observability.traces.backend.sentry import SentryBackendConfig as SentryBackendConfig
4
+ from gl_observability.traces.config import FastAPIConfig as FastAPIConfig
3
5
 
4
- __all__ = ['OpenTelemetryConfig', 'SentryConfig', 'TelemetryConfig', 'init_telemetry']
6
+ __all__ = ['TelemetryConfig', 'init_telemetry', 'FastAPIConfig', 'OpenTelemetryBackendConfig', 'SentryBackendConfig']
@@ -1,24 +1,66 @@
1
1
  from _typeshed import Incomplete
2
- from gl_observability.backend.opentelemetry.initializer import OpenTelemetryConfig as OpenTelemetryConfig, init_otel_with_external_exporter as init_otel_with_external_exporter
3
- from gl_observability.backend.sentry.initializer import SentryConfig as SentryConfig, init_sentry as init_sentry
2
+ from gl_observability.traces.backend.opentelemetry import OpenTelemetryBackendConfig as OpenTelemetryBackendConfig, init_otel_with_external_exporter as init_otel_with_external_exporter
3
+ from gl_observability.traces.backend.sentry import SentryBackendConfig as SentryBackendConfig, init_sentry as init_sentry
4
+ from gl_observability.traces.config import FastAPIConfig as FastAPIConfig, OpenTelemetryTraceConfig as OpenTelemetryTraceConfig, auto_initialize_services as auto_initialize_services, setup_tracer_provider as setup_tracer_provider
5
+ from opentelemetry.sdk.trace.sampling import Sampler
4
6
 
5
7
  class TelemetryConfig:
6
- """Configuration class for telemetry config."""
7
- sentry_config: Incomplete
8
- otel_config: Incomplete
9
- def __init__(self, sentry_config: SentryConfig | None = None, otel_config: OpenTelemetryConfig | None = None) -> None:
10
- """Initializes the telemetry configuration object with the specified parameters.
8
+ """Configuration for telemetry initialization.
9
+
10
+ All instrumentation is done via OpenTelemetry.
11
+ """
12
+ trace_sampler: Incomplete
13
+ attributes: Incomplete
14
+ fastapi_config: Incomplete
15
+ use_langchain: Incomplete
16
+ use_httpx: Incomplete
17
+ use_requests: Incomplete
18
+ backend_config: Incomplete
19
+ def __init__(self, *, attributes: dict[str, str] | None = None, trace_sampler: Sampler | None = None, fastapi_config: FastAPIConfig | None = None, use_langchain: bool = False, use_httpx: bool = True, use_requests: bool = True, backend_config: OpenTelemetryBackendConfig | SentryBackendConfig | None = None) -> None:
20
+ """Initialize the telemetry configuration.
11
21
 
12
22
  Args:
13
- sentry_config (SentryConfig): The Sentry configuration.
14
- otel_config: The OpenTelemetry config.
23
+ attributes (dict[str, str] | None, optional): Resource attributes. Defaults to None.
24
+ trace_sampler (Sampler | None, optional): The sampler for traces. Defaults to None.
25
+ fastapi_config (FastAPIConfig | None, optional): FastAPI configuration for instrumentation.
26
+ Defaults to None.
27
+ use_langchain (bool, optional): Enable Langchain instrumentation. Defaults to False.
28
+ use_httpx (bool, optional): Enable HTTPX instrumentation. Defaults to True.
29
+ use_requests (bool, optional): Enable Requests instrumentation. Defaults to True.
30
+ backend_config (OpenTelemetryBackendConfig | SentryBackendConfig | None, optional): The telemetry
31
+ backend configuration. Defaults to None. Make sure to set at least one backend configuration,
32
+ if not traces will not be exported.
15
33
  """
16
34
 
17
35
  def init_telemetry(config: TelemetryConfig) -> None:
18
- """Initializes telemetry for error tracking and performance monitoring.
36
+ '''Initialize telemetry for tracing.
37
+
38
+ This function initializes OpenTelemetry instrumentation with the specified backend.
39
+ All tracing is done via OpenTelemetry regardless of the backend.
19
40
 
20
- Initializes telemetry with the specified parameters.
41
+ Supported backends:
42
+ - OTLP: Export traces to an OTLP endpoint (Jaeger, Tempo, etc.)
43
+ - Sentry: Export traces to Sentry using OpenTelemetry
44
+
45
+ Examples:
46
+ Basic OTLP setup:
47
+ >>> from gl_observability import TelemetryConfig, init_telemetry, OpenTelemetryBackendConfig
48
+ >>>
49
+ >>> config = TelemetryConfig(
50
+ ... attributes={"service.name": "my-service"},
51
+ ... backend_config=OpenTelemetryBackendConfig(endpoint="localhost:4317")
52
+ ... )
53
+ >>> init_telemetry(config)
54
+
55
+ Sentry setup:
56
+ >>> from gl_observability import TelemetryConfig, init_telemetry, SentryBackendConfig
57
+ >>>
58
+ >>> config = TelemetryConfig(
59
+ ... attributes={"service.name": "my-service"},
60
+ ... backend_config=SentryBackendConfig(dsn="https://...")
61
+ ... )
62
+ >>> init_telemetry(config)
21
63
 
22
64
  Args:
23
65
  config (TelemetryConfig): The telemetry configuration.
24
- """
66
+ '''
@@ -0,0 +1,30 @@
1
+ from _typeshed import Incomplete
2
+ from opentelemetry.sdk.trace import TracerProvider
3
+ from typing import Any
4
+
5
+ class OpenTelemetryBackendConfig:
6
+ """Configuration for OpenTelemetry OTLP exporter."""
7
+ endpoint: Incomplete
8
+ headers: Incomplete
9
+ use_grpc: Incomplete
10
+ additional_options: Incomplete
11
+ def __init__(self, *, endpoint: str, headers: dict[str, str] = None, use_grpc: bool = True, **kwargs: Any) -> None:
12
+ '''Initializes the OpenTelemetryBackendConfig configuration object with the specified parameters.
13
+
14
+ Args:
15
+ endpoint (str): The OTLP endpoint e.g. "https://localhost:4318".
16
+ headers (dict[str, str], optional): Headers with key value for connecting to the exporter. Defaults to None.
17
+ use_grpc (bool, optional): Use gRPC for OpenTelemetry exporter. Defaults to True.
18
+ **kwargs: Additional keyword arguments passed to OTLPSpanExporter.
19
+ '''
20
+
21
+ def init_otel_with_external_exporter(tracer_provider: TracerProvider, config: OpenTelemetryBackendConfig) -> None:
22
+ """Initialize OpenTelemetry with an external OTLP exporter.
23
+
24
+ This method initializes OpenTelemetry with an external exporter (OTLP)
25
+ and instruments FastAPI, Langchain, HTTPX, and Requests if configured.
26
+
27
+ Args:
28
+ tracer_provider (TracerProvider): The tracer provider to use.
29
+ config (OpenTelemetryBackendConfig): The OTLP exporter configuration.
30
+ """
@@ -0,0 +1,37 @@
1
+ from _typeshed import Incomplete
2
+ from opentelemetry.sdk.trace import TracerProvider
3
+ from typing import Any
4
+
5
+ class SentryBackendConfig:
6
+ """Configuration object for Sentry initialization."""
7
+ dsn: Incomplete
8
+ environment: Incomplete
9
+ release: Incomplete
10
+ profiles_sample_rate: Incomplete
11
+ send_default_pii: Incomplete
12
+ disable_sentry_distributed_tracing: Incomplete
13
+ additional_options: Incomplete
14
+ def __init__(self, *, dsn: str | None = None, environment: str | None = None, release: str | None = None, profiles_sample_rate: float | None = None, send_default_pii: bool | None = None, disable_sentry_distributed_tracing: bool = False, **kwargs: Any) -> None:
15
+ """Initializes the Sentry configuration object with the specified parameters.
16
+
17
+ Args:
18
+ dsn (str | None, optional): The Sentry Project DSN. Defaults to None.
19
+ environment (str | None, optional): The environment for the Sentry project. Defaults to None.
20
+ release (str | None, optional): The release version for the Sentry project. Defaults to None.
21
+ profiles_sample_rate (float | None, optional): The sample rate for performance monitoring. Defaults to None.
22
+ send_default_pii (bool | None, optional): Whether to send default Personally Identifiable Information (PII).
23
+ Defaults to None.
24
+ disable_sentry_distributed_tracing (bool, optional): Whether to disable distributed tracing for Sentry.
25
+ Defaults to False.
26
+ **kwargs: Additional keyword arguments to pass to sentry_sdk.init
27
+ """
28
+
29
+ def init_sentry(config: SentryBackendConfig, tracer_provider: TracerProvider) -> None:
30
+ """Initializes Sentry with OpenTelemetry for error tracking and performance monitoring.
31
+
32
+ Initializes Sentry with the specified parameters.
33
+
34
+ Args:
35
+ config (SentryBackendConfig): The configuration object for Sentry initialization.
36
+ tracer_provider (TracerProvider): The tracer provider to use.
37
+ """
@@ -0,0 +1,48 @@
1
+ from _typeshed import Incomplete
2
+ from fastapi import FastAPI
3
+ from opentelemetry.sdk.trace import TracerProvider
4
+ from opentelemetry.sdk.trace.sampling import Sampler
5
+
6
+ class FastAPIConfig:
7
+ """Configuration for FastAPI instrumentation."""
8
+ app: Incomplete
9
+ def __init__(self, app: FastAPI) -> None:
10
+ """Initialize FastAPI configuration.
11
+
12
+ Args:
13
+ app (FastAPI): The FastAPI application instance.
14
+ """
15
+
16
+ class OpenTelemetryTraceConfig:
17
+ """Configuration for OpenTelemetry Trace initialization."""
18
+ provider: TracerProvider | None
19
+ attributes: Incomplete
20
+ trace_sampler: Incomplete
21
+ fastapi_config: Incomplete
22
+ use_langchain: Incomplete
23
+ use_httpx: Incomplete
24
+ use_requests: Incomplete
25
+ def __init__(self, *, attributes: dict[str, str], trace_sampler: Sampler | None, fastapi_config: FastAPIConfig | None, use_langchain: bool, use_httpx: bool, use_requests: bool) -> None:
26
+ """Initialize OpenTelemetry configuration.
27
+
28
+ Args:
29
+ attributes (dict[str, str]): Resource attributes.
30
+ trace_sampler (Sampler): Trace sampler.
31
+ fastapi_config (FastAPIConfig): FastAPI configuration.
32
+ use_langchain (bool): Enable Langchain instrumentation.
33
+ use_httpx (bool): Enable HTTPX instrumentation.
34
+ use_requests (bool): Enable Requests instrumentation.
35
+ """
36
+
37
+ def setup_tracer_provider(opentelemetry_config: OpenTelemetryTraceConfig):
38
+ """Set up the TracerProvider with the given configuration.
39
+
40
+ Args:
41
+ opentelemetry_config (OpenTelemetryTraceConfig): The configuration for OpenTelemetry.
42
+ """
43
+ def auto_initialize_services(opentelemetry_config: OpenTelemetryTraceConfig) -> None:
44
+ """Automatically initialize FastAPI, Langchain, HTTPX, and Requests tracing if applicable.
45
+
46
+ Args:
47
+ opentelemetry_config (OpenTelemetryTraceConfig): The configuration for OpenTelemetry.
48
+ """
@@ -1,7 +1,7 @@
1
1
  from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
2
2
  from typing import Collection
3
3
 
4
- class BOSAFunctionsInstrumentor(BaseInstrumentor):
4
+ class FunctionsInstrumentor(BaseInstrumentor):
5
5
  """OpenTelemetry Generic Function Instrumentor.
6
6
 
7
7
  Supports:
@@ -61,7 +61,7 @@ class BOSAFunctionsInstrumentor(BaseInstrumentor):
61
61
  from module.classes.custom_class import CustomClass
62
62
 
63
63
  # Instrument all functions in the module
64
- BOSAFunctionsInstrumentor().instrument(
64
+ FunctionsInstrumentor().instrument(
65
65
  methods=[
66
66
  functions.sync_function, functions.async_function,
67
67
  CustomClass.method, CustomClass.class_method,
@@ -85,7 +85,7 @@ class BOSAFunctionsInstrumentor(BaseInstrumentor):
85
85
  await functions.async_function(...)
86
86
 
87
87
  # Uninstrument all functions in the module
88
- BOSAFunctionsInstrumentor().uninstrument()
88
+ FunctionsInstrumentor().uninstrument()
89
89
  ```
90
90
 
91
91
  Note:
@@ -1,7 +1,7 @@
1
1
  import http.client
2
2
  from dataclasses import dataclass
3
3
  from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
4
- from opentelemetry.trace import Span, Tracer as Tracer, TracerProvider as TracerProvider
4
+ from opentelemetry.trace import Span, Tracer, TracerProvider
5
5
  from typing import Any, Callable
6
6
 
7
7
  METHOD_INDEX: int
Binary file
gl_observability.pyi CHANGED
@@ -1,8 +1,10 @@
1
1
  # This file was generated by Nuitka
2
2
 
3
3
  # Stubs included by default
4
+ from gl_observability.traces.backend.opentelemetry import OpenTelemetryBackendConfig
5
+ from gl_observability.traces.config import FastAPIConfig
6
+ from gl_observability.traces.backend.sentry import SentryBackendConfig
4
7
  from gl_observability.initializer import TelemetryConfig, init_telemetry
5
- from gl_observability.backend import OpenTelemetryConfig, SentryConfig
6
8
 
7
9
 
8
10
  __name__ = ...
@@ -11,10 +13,14 @@ __name__ = ...
11
13
 
12
14
  # Modules used internally, to allow implicit dependencies to be seen:
13
15
  import os
14
- import gl_observability.backend.OpenTelemetryConfig
15
- import gl_observability.backend.SentryConfig
16
- import fastapi
17
16
  import opentelemetry
17
+ import opentelemetry.sdk
18
+ import opentelemetry.sdk.trace
19
+ import opentelemetry.sdk.trace.sampling
20
+ import logging
21
+ import typing
22
+ import requests
23
+ import re
18
24
  import opentelemetry.exporter
19
25
  import opentelemetry.exporter.otlp
20
26
  import opentelemetry.exporter.otlp.proto
@@ -22,24 +28,18 @@ import opentelemetry.exporter.otlp.proto.grpc
22
28
  import opentelemetry.exporter.otlp.proto.grpc.trace_exporter
23
29
  import opentelemetry.exporter.otlp.proto.http
24
30
  import opentelemetry.exporter.otlp.proto.http.trace_exporter
31
+ import opentelemetry.sdk.trace.export
32
+ import sentry_sdk
33
+ import opentelemetry.propagate
34
+ import sentry_sdk.integrations
35
+ import sentry_sdk.integrations.opentelemetry
36
+ import fastapi
25
37
  import opentelemetry.instrumentation
26
38
  import opentelemetry.instrumentation.fastapi
27
39
  import opentelemetry.instrumentation.httpx
28
40
  import opentelemetry.instrumentation.langchain
29
41
  import opentelemetry.instrumentation.requests
30
- import opentelemetry.propagate
31
- import opentelemetry.sdk
32
42
  import opentelemetry.sdk.resources
33
- import opentelemetry.sdk.trace
34
- import opentelemetry.sdk.trace.export
35
- import opentelemetry.sdk.trace.sampling
36
- import sentry_sdk
37
- import sentry_sdk.integrations
38
- import sentry_sdk.integrations.opentelemetry
39
- import typing
40
- import logging
41
- import requests
42
- import re
43
43
  import importlib
44
44
  import inspect
45
45
  import wrapt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: gl-observability-binary
3
- Version: 0.0.0b1
3
+ Version: 0.1.0
4
4
  Summary: SDK for Observability tools
5
5
  Author-email: HansSeanNathanael <hans.s.nathanael@gdplabs.id>
6
6
  Requires-Python: <3.14,>=3.11
@@ -92,7 +92,7 @@ This setup sends traces to an external OTLP collector (e.g., Jaeger, Tempo).
92
92
 
93
93
  ```python
94
94
  from fastapi import FastAPI
95
- from gl_observability.backend import FastAPIConfig, OpenTelemetryConfig
95
+ from gl_observability.traces.opentelemetry import FastAPIConfig, OpenTelemetryConfig
96
96
  from gl_observability import TelemetryConfig, init_telemetry
97
97
 
98
98
  # 1. Setup FastAPI Config (optional, if using FastAPI)
@@ -119,7 +119,7 @@ init_telemetry(TelemetryConfig(otel_config=otel_config))
119
119
  This setup sends errors and traces to Sentry.
120
120
 
121
121
  ```python
122
- from gl_observability.backend import SentryConfig
122
+ from gl_observability.traces.sentry import SentryConfig
123
123
  from gl_observability import TelemetryConfig, init_telemetry
124
124
 
125
125
  def traces_sampler(sampling_context: dict) -> float:
@@ -145,7 +145,8 @@ This setup combines Sentry with OpenTelemetry instrumentation, allowing Sentry t
145
145
 
146
146
  ```python
147
147
  from fastapi import FastAPI
148
- from gl_observability.backend import FastAPIConfig, OpenTelemetryConfig, SentryConfig
148
+ from gl_observability.traces.opentelemetry import FastAPIConfig, OpenTelemetryConfig
149
+ from gl_observability.traces.sentry import SentryConfig
149
150
  from gl_observability import TelemetryConfig, init_telemetry
150
151
 
151
152
  app = FastAPI()
@@ -0,0 +1,20 @@
1
+ gl_observability.cp311-win_amd64.pyd,sha256=JEpUOre6UBjt9Fuv9MYykQtUa3UrqhIqTImmrJ-Jpv4,656896
2
+ gl_observability.pyi,sha256=zLWMUAsSLQclPGwJIhjJpDo_yw3gjUE3RmEB0e2JDUQ,1671
3
+ gl_observability/__init__.pyi,sha256=YvrsoNmib8ulmQtWz9yxKyHDWnsTxzLWXOiI5C-BqmM,518
4
+ gl_observability/initializer.pyi,sha256=T8_r7zuT8zrVofPemaS-9TEliOy0iqR-hAgq6sPGN6I,3524
5
+ gl_observability/logs/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ gl_observability/logs/ner_pii_logger_handler.pyi,sha256=KkX_78DsEJVFqdgcrrV-sosUmIR14gKJD6JEp16YOLU,1573
7
+ gl_observability/logs/regex_pii_logger_handler.pyi,sha256=mN9pAOn8t3GrEjM7hldAn2HZLV8m3Ja2wY5vwWDWdAI,2538
8
+ gl_observability/traces/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ gl_observability/traces/config.pyi,sha256=E-U-Sda2CL4VKXQPTkGdwLSB230jusIHHbFKW8hC98I,1982
10
+ gl_observability/traces/backend/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ gl_observability/traces/backend/opentelemetry.pyi,sha256=VaQPBEHHhLT4elEcjll0DgQTIb9RW5BSWqEI8It3cdo,1460
12
+ gl_observability/traces/backend/sentry.pyi,sha256=dVrmxAc5F7vZym3NQ6G7gCynuwa_TkstodEkFSvdhbs,2049
13
+ gl_observability/traces/instrument/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ gl_observability/traces/instrument/functions.pyi,sha256=Hd2CmrBF4qxjb_LEUf5jgljVJ1DKy7XiQXJzvpYTl5w,4293
15
+ gl_observability/traces/instrument/http.pyi,sha256=F86Nscqe9GxNdEduPJepzzjg3EeLZL-zRMUSj7tPxRg,2033
16
+ gl_observability.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
17
+ gl_observability_binary-0.1.0.dist-info/METADATA,sha256=l-feSdIDQ99lCJ-qXF6jmekmDswcojtMmNa-4n3zagc,7429
18
+ gl_observability_binary-0.1.0.dist-info/WHEEL,sha256=l2aKBREYfqJ7T2ljmr6hUiXPoNvvXF47bG4IHjuSyS4,96
19
+ gl_observability_binary-0.1.0.dist-info/top_level.txt,sha256=qX0-e4NxRAAXXjWIZ7gvIspQP7J_dgxPQ7e3-WEbIeQ,17
20
+ gl_observability_binary-0.1.0.dist-info/RECORD,,
@@ -1,4 +0,0 @@
1
- from gl_observability.backend.opentelemetry.initializer import FastAPIConfig as FastAPIConfig, OpenTelemetryConfig as OpenTelemetryConfig
2
- from gl_observability.backend.sentry.initializer import SentryConfig as SentryConfig
3
-
4
- __all__ = ['OpenTelemetryConfig', 'SentryConfig', 'FastAPIConfig']
@@ -1,61 +0,0 @@
1
- from _typeshed import Incomplete
2
- from fastapi import FastAPI as FastAPI
3
- from opentelemetry.sdk.trace import TracerProvider
4
- from opentelemetry.sdk.trace.sampling import Sampler as Sampler
5
-
6
- class FastAPIConfig:
7
- """Configuration class for FastAPI application."""
8
- app: Incomplete
9
- def __init__(self, app: FastAPI) -> None:
10
- """Initializes FastAPIConfig with a FastAPI application.
11
-
12
- Args:
13
- app (FastAPI): The FastAPI application to configure.
14
- """
15
-
16
- class OpenTelemetryConfig:
17
- """Configuration-based initializer for OpenTelemetry with FastAPI and Langchain support."""
18
- provider: TracerProvider | None
19
- endpoint: Incomplete
20
- trace_sampler: Incomplete
21
- headers: Incomplete
22
- attributes: Incomplete
23
- use_grpc: Incomplete
24
- fastapi_config: Incomplete
25
- use_langchain: Incomplete
26
- use_httpx: Incomplete
27
- use_requests: Incomplete
28
- disable_sentry_distributed_tracing: Incomplete
29
- def __init__(self, endpoint: str = '', trace_sampler: Sampler = None, headers: dict[str, str] = None, attributes: dict[str, str] = None, use_grpc: bool = True, fastapi_config: FastAPIConfig | None = None, use_langchain: bool = False, use_httpx: bool = True, use_requests: bool = True, disable_sentry_distributed_tracing: bool = False) -> None:
30
- '''Initializes OpenTelemetryConfig with optional attributes.
31
-
32
- Args:
33
- endpoint (str): The OTLP endpoint. If you have port, please concat with the endpoint, e.g. "localhost:4317".
34
- trace_sampler (Sampler): The sampler for traces.
35
- headers (dict[str, str]): Headers with key value for connecting to the exporter.
36
- attributes (dict[str, str]): Additional resource attributes.
37
- use_grpc (bool): use grpc for opentelemetry exporter.
38
- fastapi_config (FastAPI | None): The FastAPI fastapi_config (if using FastAPI tracing).
39
- use_langchain (bool): Whether to use Langchain tracing.
40
- use_httpx (bool): Whether to use httpx for tracing.
41
- use_requests (bool): Whether to use requests for tracing.
42
- disable_sentry_distributed_tracing (bool): Disable Sentry distributed tracing.
43
- '''
44
-
45
- def init_otel_with_external_exporter(initializer: OpenTelemetryConfig) -> None:
46
- """Initializes OpenTelemetry with an external exporter.
47
-
48
- This method initializes OpenTelemetry with an external exporter (OTLP)
49
- and instruments FastAPI and Langchain if applicable.
50
-
51
- Args:
52
- initializer (OpenTelemetryConfig): The configuration for OpenTelemetry.
53
- """
54
- def init_otel_sentry(initializer: OpenTelemetryConfig) -> None:
55
- """Initializes OpenTelemetry tracing.
56
-
57
- This method initializes OpenTelemetry with Sentry and instruments FastAPI and Langchain if applicable.
58
-
59
- Args:
60
- initializer (OpenTelemetryConfig): The configuration for OpenTelemetry.
61
- """
@@ -1,39 +0,0 @@
1
- from _typeshed import Incomplete
2
- from gl_observability.backend.opentelemetry.initializer import OpenTelemetryConfig as OpenTelemetryConfig, init_otel_sentry as init_otel_sentry
3
- from typing import Any
4
-
5
- class SentryConfig:
6
- """Configuration object for Sentry initialization.
7
-
8
- this class is used to store the configuration for Sentry initialization.
9
- """
10
- dsn: Incomplete
11
- environment: Incomplete
12
- release: Incomplete
13
- profiles_sample_rate: Incomplete
14
- send_default_pii: Incomplete
15
- traces_sampler: Incomplete
16
- open_telemetry_config: Incomplete
17
- additional_options: Incomplete
18
- def __init__(self, dsn: str | None = None, environment: str | None = None, release: str | None = None, profiles_sample_rate: float | None = None, send_default_pii: bool | None = None, traces_sampler=None, open_telemetry_config: OpenTelemetryConfig | None = None, **kwargs: Any) -> None:
19
- """Initializes the Sentry configuration object with the specified parameters.
20
-
21
- Args:
22
- dsn (str): The Data Source Name (DSN) for the Sentry project.
23
- environment (str): The environment for the Sentry project.
24
- release (str): The release version for the Sentry project.
25
- profiles_sample_rate (float): The sample rate for performance monitoring.
26
- send_default_pii (bool): Whether to send default Personally Identifiable Information (PII).
27
- traces_sampler (TracesSampler): The sampler for traces.
28
- open_telemetry_config: The OpenTelemetry Config
29
- **kwargs: Additional keyword arguments to pass to sentry_sdk.init
30
- """
31
-
32
- def init_sentry(config: SentryConfig | None = None) -> None:
33
- """Initializes Sentry for error tracking and performance monitoring.
34
-
35
- Initializes Sentry with the specified parameters.
36
-
37
- Args:
38
- config (SentryConfig | None, optional): The configuration object for Sentry initialization. Defaults to None.
39
- """
File without changes
@@ -1,4 +0,0 @@
1
- from gl_observability.traces.opentelemetry.instrument.functions import BOSAFunctionsInstrumentor as BOSAFunctionsInstrumentor
2
- from gl_observability.traces.opentelemetry.instrument.http import HTTPClientInstrumentor as HTTPClientInstrumentor
3
-
4
- __all__ = ['BOSAFunctionsInstrumentor', 'HTTPClientInstrumentor']
@@ -1,22 +0,0 @@
1
- gl_observability.cp311-win_amd64.pyd,sha256=lPtli1Zf8apyEx1Od88UfF_cU0Od80IypPe2kuOdvpk,661504
2
- gl_observability.pyi,sha256=46n3y42spCx9vMmhRew5Ah26B67UoblpNHDsmIb8uU8,1626
3
- gl_observability/__init__.pyi,sha256=Ae5Vy1UKE0GokAsbCejhl8IfomzxoHQklX1EMqWAZEs,312
4
- gl_observability/initializer.pyi,sha256=vSBAy4QdpjDbrmKLYwFk_yBzwqCklDvMyTiVsmAWEzw,1108
5
- gl_observability/backend/__init__.pyi,sha256=IbzwPhr570SWM4925eUdYt_QarRz0idNResU9gv6Lig,295
6
- gl_observability/backend/opentelemetry/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- gl_observability/backend/opentelemetry/initializer.pyi,sha256=X4ojVPJVwcdghJq0RHytwvltEyiV3qC8uZv1u7h7Rhc,2947
8
- gl_observability/backend/sentry/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- gl_observability/backend/sentry/initializer.pyi,sha256=pOZGRlHCM2TLi-3knvvWFLSB1gbeyeGx6lDnthuJ7Ss,1990
10
- gl_observability/logs/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- gl_observability/logs/ner_pii_logger_handler.pyi,sha256=KkX_78DsEJVFqdgcrrV-sosUmIR14gKJD6JEp16YOLU,1573
12
- gl_observability/logs/regex_pii_logger_handler.pyi,sha256=mN9pAOn8t3GrEjM7hldAn2HZLV8m3Ja2wY5vwWDWdAI,2538
13
- gl_observability/traces/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- gl_observability/traces/opentelemetry/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- gl_observability/traces/opentelemetry/instrument/__init__.pyi,sha256=PC9q9GLoWkGDGgcrYsp6j3rpS_A3yse80NaCAb-3BBQ,312
16
- gl_observability/traces/opentelemetry/instrument/functions.pyi,sha256=NeLDDzYJwXrAR5ltmfkdqj78UQqbyTHtW-eFXgoI5uM,4305
17
- gl_observability/traces/opentelemetry/instrument/http.pyi,sha256=GQRN3YdFElTF-m_nRWUG8XE50ge1QxMmRJiLY1TYP3c,2061
18
- gl_observability.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
19
- gl_observability_binary-0.0.0b1.dist-info/METADATA,sha256=r1pS0wyqq4WC19Hzp5mLoYu1lu_8jqW2GcUx-dGQA5o,7356
20
- gl_observability_binary-0.0.0b1.dist-info/WHEEL,sha256=l2aKBREYfqJ7T2ljmr6hUiXPoNvvXF47bG4IHjuSyS4,96
21
- gl_observability_binary-0.0.0b1.dist-info/top_level.txt,sha256=qX0-e4NxRAAXXjWIZ7gvIspQP7J_dgxPQ7e3-WEbIeQ,17
22
- gl_observability_binary-0.0.0b1.dist-info/RECORD,,