nvidia-nat-weave 1.4.0a20251022__py3-none-any.whl → 1.4.0a20251024__py3-none-any.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.
@@ -14,6 +14,7 @@
14
14
  # limitations under the License.
15
15
 
16
16
  import logging
17
+ import typing
17
18
 
18
19
  from pydantic import Field
19
20
 
@@ -41,6 +42,8 @@ class WeaveTelemetryExporter(TelemetryExporterBaseConfig, name="weave"):
41
42
  default=None,
42
43
  description="Additional keys to redact from traces beyond the default (api_key, auth_headers, authorization).")
43
44
  verbose: bool = Field(default=False, description="Whether to enable verbose logging.")
45
+ attributes: dict[str, typing.Any] | None = Field(default=None,
46
+ description="Custom attributes to include in the traces.")
44
47
 
45
48
 
46
49
  @register_telemetry_exporter(config_type=WeaveTelemetryExporter)
@@ -71,4 +74,7 @@ async def weave_telemetry_exporter(config: WeaveTelemetryExporter, builder: Buil
71
74
  for key in config.redact_keys:
72
75
  sanitize.add_redact_key(key)
73
76
 
74
- yield WeaveExporter(project=config.project, entity=config.entity, verbose=config.verbose)
77
+ yield WeaveExporter(project=config.project,
78
+ entity=config.entity,
79
+ verbose=config.verbose,
80
+ attributes=config.attributes)
@@ -51,10 +51,12 @@ class WeaveExporter(SpanExporter[Span, Span]):
51
51
  context_state=None,
52
52
  entity: str | None = None,
53
53
  project: str | None = None,
54
- verbose: bool = False):
54
+ verbose: bool = False,
55
+ attributes: dict[str, Any] | None = None):
55
56
  super().__init__(context_state=context_state)
56
57
  self._entity = entity
57
58
  self._project = project
59
+ self._attributes = attributes or {}
58
60
  self._gc = weave_client_context.require_weave_client()
59
61
 
60
62
  # Optionally, set log filtering for presidio-analyzer to reduce verbosity
@@ -160,11 +162,14 @@ class WeaveExporter(SpanExporter[Span, Span]):
160
162
  inputs["input"] = str(step.payload.data.input)
161
163
 
162
164
  # Create the Weave call
165
+ attributes = span.attributes.copy()
166
+ attributes.update(self._attributes)
167
+
163
168
  call = self._gc.create_call(
164
169
  op_name,
165
170
  inputs=inputs,
166
171
  parent=parent_call,
167
- attributes=span.attributes,
172
+ attributes=attributes,
168
173
  display_name=op_name,
169
174
  )
170
175
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nvidia-nat-weave
3
- Version: 1.4.0a20251022
3
+ Version: 1.4.0a20251024
4
4
  Summary: Subpackage for Weave integration in NeMo Agent toolkit
5
5
  Author: NVIDIA Corporation
6
6
  Maintainer: NVIDIA Corporation
@@ -16,7 +16,7 @@ Requires-Python: <3.14,>=3.11
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE-3rd-party.txt
18
18
  License-File: LICENSE.md
19
- Requires-Dist: nvidia-nat==v1.4.0a20251022
19
+ Requires-Dist: nvidia-nat==v1.4.0a20251024
20
20
  Requires-Dist: presidio-analyzer~=2.2
21
21
  Requires-Dist: presidio-anonymizer~=2.2
22
22
  Requires-Dist: weave==0.52.6
@@ -0,0 +1,11 @@
1
+ nat/meta/pypi.md,sha256=FVQR5lfZjqZHm4VWMmQJYgZbwJJjrfQZgEqHscDuMR8,1121
2
+ nat/plugins/weave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ nat/plugins/weave/register.py,sha256=JGhp7u_LheQH-zBFw3EfJCeUo7TY5WC-rZQuvyEyifs,3547
4
+ nat/plugins/weave/weave_exporter.py,sha256=FkY-xkOyOIRrr3ls7uEMxCgnr3e6pVbaqqrfejffWbA,12446
5
+ nvidia_nat_weave-1.4.0a20251024.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
6
+ nvidia_nat_weave-1.4.0a20251024.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
7
+ nvidia_nat_weave-1.4.0a20251024.dist-info/METADATA,sha256=AlEf0IgvoR20l61SLGyf-WLvAYJxl0IRNcM9RUxTBJ8,2014
8
+ nvidia_nat_weave-1.4.0a20251024.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ nvidia_nat_weave-1.4.0a20251024.dist-info/entry_points.txt,sha256=xg4vW3wKsOLfHa-QR6JqWnq3DmdfI_z9IZfg4I9thTY,56
10
+ nvidia_nat_weave-1.4.0a20251024.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
11
+ nvidia_nat_weave-1.4.0a20251024.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- nat/meta/pypi.md,sha256=FVQR5lfZjqZHm4VWMmQJYgZbwJJjrfQZgEqHscDuMR8,1121
2
- nat/plugins/weave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- nat/plugins/weave/register.py,sha256=EWd3c2eLuNeXQk8CWM5sbP9SUtj59hvhLZaEAQiqbRg,3252
4
- nat/plugins/weave/weave_exporter.py,sha256=zgR4-_Mv8PKAH7WvWwbL51Q89deH_2oiqkSrXd82KHg,12259
5
- nvidia_nat_weave-1.4.0a20251022.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
6
- nvidia_nat_weave-1.4.0a20251022.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
7
- nvidia_nat_weave-1.4.0a20251022.dist-info/METADATA,sha256=z2z8mUvT_lFV4C06cYjpLMUxPbxSMQt518C0tUCLnz0,2014
8
- nvidia_nat_weave-1.4.0a20251022.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- nvidia_nat_weave-1.4.0a20251022.dist-info/entry_points.txt,sha256=xg4vW3wKsOLfHa-QR6JqWnq3DmdfI_z9IZfg4I9thTY,56
10
- nvidia_nat_weave-1.4.0a20251022.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
11
- nvidia_nat_weave-1.4.0a20251022.dist-info/RECORD,,