odigos-opentelemetry-python 1.0.82__tar.gz → 1.0.83__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.
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/PKG-INFO +1 -1
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/components.py +4 -5
- odigos_opentelemetry_python-1.0.83/initializer/version.py +1 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/odigos_opentelemetry_python.egg-info/PKG-INFO +1 -1
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/opamp/config.py +1 -1
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/opamp/http_client.py +18 -18
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/pyproject.toml +1 -1
- odigos_opentelemetry_python-1.0.82/initializer/version.py +0 -1
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/LICENSE +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/README.md +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/__init__.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/distro/__init__.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/distro/distro.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/distro/instrumentation_registry.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/envs.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/exit_hook.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/lib_handling.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/odigos_sampler.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/post_instrument.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/process_resource.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/schemas/__init__.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/schemas/sampling.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/odigos_opentelemetry_python.egg-info/SOURCES.txt +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/odigos_opentelemetry_python.egg-info/dependency_links.txt +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/odigos_opentelemetry_python.egg-info/entry_points.txt +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/odigos_opentelemetry_python.egg-info/requires.txt +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/odigos_opentelemetry_python.egg-info/top_level.txt +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/opamp/__init__.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/opamp/anyvalue_pb2.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/opamp/health_status.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/opamp/opamp_pb2.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/opamp/opamp_registry.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/opamp/utils.py +0 -0
- {odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/setup.cfg +0 -0
{odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/components.py
RENAMED
|
@@ -267,12 +267,11 @@ def update_agent_config(conf: Config):
|
|
|
267
267
|
if provider is None:
|
|
268
268
|
return
|
|
269
269
|
|
|
270
|
-
# Update sampler configuration if
|
|
271
|
-
if hasattr(conf, '
|
|
272
|
-
# Extract headSampling configuration from traces.headSampling
|
|
270
|
+
# Update sampler configuration if container_config is present
|
|
271
|
+
if hasattr(conf, 'container_config') and conf.container_config:
|
|
273
272
|
head_sampling_config = None
|
|
274
|
-
if 'traces' in conf.
|
|
275
|
-
head_sampling_config = conf.
|
|
273
|
+
if 'traces' in conf.container_config and 'headSampling' in conf.container_config['traces']:
|
|
274
|
+
head_sampling_config = conf.container_config['traces']['headSampling']
|
|
276
275
|
|
|
277
276
|
# Apply config to sampler - sampler will always exist when this callback is called
|
|
278
277
|
# because update_agent_config is only called from OpAMP worker thread after sampler creation
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VERSION = "1.0.83"
|
|
@@ -27,7 +27,7 @@ class CodeAttributes(DefaultNoneMixin):
|
|
|
27
27
|
@dataclass
|
|
28
28
|
class Config(DefaultNoneMixin):
|
|
29
29
|
code_attributes: CodeAttributes = field(default_factory=CodeAttributes)
|
|
30
|
-
|
|
30
|
+
container_config: Dict[str, Any] = field(default_factory=dict)
|
|
31
31
|
span_metrics_mode: Optional[str] = None
|
|
32
32
|
|
|
33
33
|
|
{odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/opamp/http_client.py
RENAMED
|
@@ -23,7 +23,7 @@ from initializer.process_resource import PROCESS_VPID
|
|
|
23
23
|
from google.protobuf.json_format import MessageToDict
|
|
24
24
|
from google.protobuf.message import DecodeError
|
|
25
25
|
|
|
26
|
-
from opamp.config import from_dict, Config
|
|
26
|
+
from opamp.config import from_dict, Config, CodeAttributes
|
|
27
27
|
|
|
28
28
|
# Setup the logger
|
|
29
29
|
opamp_logger = logging.getLogger('odigos')
|
|
@@ -183,8 +183,7 @@ class OpAMPHTTPClient:
|
|
|
183
183
|
self.opamp_connection_event.error = False
|
|
184
184
|
return
|
|
185
185
|
|
|
186
|
-
except Exception
|
|
187
|
-
print(f"[send_first_message_with_retry] Error: {e}", flush=True)
|
|
186
|
+
except Exception:
|
|
188
187
|
pass
|
|
189
188
|
|
|
190
189
|
if attempt < max_retries:
|
|
@@ -304,21 +303,22 @@ class OpAMPHTTPClient:
|
|
|
304
303
|
# If not JSON, just keep it as raw bytes
|
|
305
304
|
decoded_map[key] = body_bytes
|
|
306
305
|
|
|
307
|
-
|
|
308
|
-
if inner is None:
|
|
309
|
-
config = Config() # Return default values for config
|
|
310
|
-
else:
|
|
311
|
-
config = from_dict(Config, inner)
|
|
306
|
+
config = Config()
|
|
312
307
|
|
|
313
308
|
# Extract container_config if present
|
|
314
|
-
|
|
315
|
-
if
|
|
316
|
-
config.
|
|
309
|
+
container_config = decoded_map.get("container_config", None)
|
|
310
|
+
if container_config is not None:
|
|
311
|
+
config.container_config = container_config
|
|
317
312
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
313
|
+
traces = container_config.get('traces', {})
|
|
314
|
+
|
|
315
|
+
span_metrics_mode = traces.get('headSampling', {}).get('spanMetricsMode')
|
|
316
|
+
if span_metrics_mode is not None:
|
|
317
|
+
config.span_metrics_mode = span_metrics_mode
|
|
318
|
+
|
|
319
|
+
code_attrs_raw = traces.get('codeAttributes')
|
|
320
|
+
if isinstance(code_attrs_raw, dict):
|
|
321
|
+
config.code_attributes = from_dict(CodeAttributes, code_attrs_raw)
|
|
322
322
|
|
|
323
323
|
return config
|
|
324
324
|
|
|
@@ -456,14 +456,14 @@ class OpAMPHTTPClient:
|
|
|
456
456
|
|
|
457
457
|
def _extract_sampler_config(self, remote_config):
|
|
458
458
|
"""Extract sampler config from remote config, same logic as update_agent_config"""
|
|
459
|
-
if not hasattr(remote_config, '
|
|
459
|
+
if not hasattr(remote_config, 'container_config') or not remote_config.container_config:
|
|
460
460
|
return None
|
|
461
461
|
|
|
462
462
|
# Extract headSampling configuration from traces.headSampling
|
|
463
|
-
if 'traces' not in remote_config.
|
|
463
|
+
if 'traces' not in remote_config.container_config or 'headSampling' not in remote_config.container_config['traces']:
|
|
464
464
|
return None
|
|
465
465
|
|
|
466
|
-
return remote_config.
|
|
466
|
+
return remote_config.container_config['traces']['headSampling'] or None
|
|
467
467
|
|
|
468
468
|
def get_initial_sampler_config(self):
|
|
469
469
|
"""Get the sampler config from the initial OpAMP message"""
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
VERSION = "1.0.82"
|
|
File without changes
|
|
File without changes
|
{odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/envs.py
RENAMED
|
File without changes
|
{odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/initializer/exit_hook.py
RENAMED
|
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
|
{odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/opamp/anyvalue_pb2.py
RENAMED
|
File without changes
|
{odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/opamp/health_status.py
RENAMED
|
File without changes
|
{odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/opamp/opamp_pb2.py
RENAMED
|
File without changes
|
{odigos_opentelemetry_python-1.0.82 → odigos_opentelemetry_python-1.0.83}/opamp/opamp_registry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|