nvidia-nat-opentelemetry 1.4.0a20251029__py3-none-any.whl → 1.4.0a20251030__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.

Potentially problematic release.


This version of nvidia-nat-opentelemetry might be problematic. Click here for more details.

@@ -20,6 +20,9 @@ from pydantic import Field
20
20
 
21
21
  from nat.builder.builder import Builder
22
22
  from nat.cli.register_workflow import register_telemetry_exporter
23
+ from nat.data_models.common import OptionalSecretStr
24
+ from nat.data_models.common import SerializableSecretStr
25
+ from nat.data_models.common import get_secret_value
23
26
  from nat.data_models.telemetry_exporter import TelemetryExporterBaseConfig
24
27
  from nat.observability.mixin.batch_config_mixin import BatchConfigMixin
25
28
  from nat.observability.mixin.collector_config_mixin import CollectorConfigMixin
@@ -31,8 +34,8 @@ class LangfuseTelemetryExporter(BatchConfigMixin, TelemetryExporterBaseConfig, n
31
34
  """A telemetry exporter to transmit traces to externally hosted langfuse service."""
32
35
 
33
36
  endpoint: str = Field(description="The langfuse OTEL endpoint (/api/public/otel/v1/traces)")
34
- public_key: str = Field(description="The Langfuse public key", default="")
35
- secret_key: str = Field(description="The Langfuse secret key", default="")
37
+ public_key: SerializableSecretStr = Field(description="The Langfuse public key", default="")
38
+ secret_key: SerializableSecretStr = Field(description="The Langfuse secret key", default="")
36
39
  resource_attributes: dict[str, str] = Field(default_factory=dict,
37
40
  description="The resource attributes to add to the span")
38
41
 
@@ -44,8 +47,8 @@ async def langfuse_telemetry_exporter(config: LangfuseTelemetryExporter, builder
44
47
 
45
48
  from nat.plugins.opentelemetry import OTLPSpanAdapterExporter
46
49
 
47
- secret_key = config.secret_key or os.environ.get("LANGFUSE_SECRET_KEY")
48
- public_key = config.public_key or os.environ.get("LANGFUSE_PUBLIC_KEY")
50
+ secret_key = get_secret_value(config.secret_key) if config.secret_key else os.environ.get("LANGFUSE_SECRET_KEY")
51
+ public_key = get_secret_value(config.public_key) if config.public_key else os.environ.get("LANGFUSE_PUBLIC_KEY")
49
52
  if not secret_key or not public_key:
50
53
  raise ValueError("secret and public keys are required for langfuse")
51
54
 
@@ -69,7 +72,7 @@ class LangsmithTelemetryExporter(BatchConfigMixin, CollectorConfigMixin, Telemet
69
72
  description="The langsmith OTEL endpoint",
70
73
  default="https://api.smith.langchain.com/otel/v1/traces",
71
74
  )
72
- api_key: str = Field(description="The Langsmith API key", default="")
75
+ api_key: SerializableSecretStr = Field(description="The Langsmith API key", default="")
73
76
  resource_attributes: dict[str, str] = Field(default_factory=dict,
74
77
  description="The resource attributes to add to the span")
75
78
 
@@ -80,7 +83,7 @@ async def langsmith_telemetry_exporter(config: LangsmithTelemetryExporter, build
80
83
 
81
84
  from nat.plugins.opentelemetry import OTLPSpanAdapterExporter
82
85
 
83
- api_key = config.api_key or os.environ.get("LANGSMITH_API_KEY")
86
+ api_key = get_secret_value(config.api_key) if config.api_key else os.environ.get("LANGSMITH_API_KEY")
84
87
  if not api_key:
85
88
  raise ValueError("API key is required for langsmith")
86
89
 
@@ -134,7 +137,7 @@ async def otel_telemetry_exporter(config: OtelCollectorTelemetryExporter, builde
134
137
  class PatronusTelemetryExporter(BatchConfigMixin, CollectorConfigMixin, TelemetryExporterBaseConfig, name="patronus"):
135
138
  """A telemetry exporter to transmit traces to Patronus service."""
136
139
 
137
- api_key: str = Field(description="The Patronus API key", default="")
140
+ api_key: SerializableSecretStr = Field(description="The Patronus API key", default="")
138
141
  resource_attributes: dict[str, str] = Field(default_factory=dict,
139
142
  description="The resource attributes to add to the span")
140
143
 
@@ -145,7 +148,7 @@ async def patronus_telemetry_exporter(config: PatronusTelemetryExporter, builder
145
148
 
146
149
  from nat.plugins.opentelemetry import OTLPSpanAdapterExporter
147
150
 
148
- api_key = config.api_key or os.environ.get("PATRONUS_API_KEY")
151
+ api_key = get_secret_value(config.api_key) if config.api_key else os.environ.get("PATRONUS_API_KEY")
149
152
  if not api_key:
150
153
  raise ValueError("API key is required for Patronus")
151
154
 
@@ -169,7 +172,7 @@ class GalileoTelemetryExporter(BatchConfigMixin, CollectorConfigMixin, Telemetry
169
172
  endpoint: str = Field(description="The galileo endpoint to export telemetry traces.",
170
173
  default="https://app.galileo.ai/api/galileo/otel/traces")
171
174
  logstream: str = Field(description="The logstream name to group the telemetry traces.")
172
- api_key: str = Field(description="The api key to authenticate with the galileo service.")
175
+ api_key: SerializableSecretStr = Field(description="The api key to authenticate with the galileo service.")
173
176
 
174
177
 
175
178
  @register_telemetry_exporter(config_type=GalileoTelemetryExporter)
@@ -179,7 +182,7 @@ async def galileo_telemetry_exporter(config: GalileoTelemetryExporter, builder:
179
182
  from nat.plugins.opentelemetry import OTLPSpanAdapterExporter
180
183
 
181
184
  headers = {
182
- "Galileo-API-Key": config.api_key,
185
+ "Galileo-API-Key": get_secret_value(config.api_key),
183
186
  "logstream": config.logstream,
184
187
  "project": config.project,
185
188
  }
@@ -199,7 +202,7 @@ class DBNLTelemetryExporter(BatchConfigMixin, TelemetryExporterBaseConfig, name=
199
202
  """A telemetry exporter to transmit traces to DBNL."""
200
203
 
201
204
  api_url: str | None = Field(description="The DBNL API URL.", default=None)
202
- api_token: str | None = Field(description="The DBNL API token.", default=None)
205
+ api_token: OptionalSecretStr = Field(description="The DBNL API token.", default=None)
203
206
  project_id: str | None = Field(description="The DBNL project id.", default=None)
204
207
 
205
208
 
@@ -209,7 +212,7 @@ async def dbnl_telemetry_exporter(config: DBNLTelemetryExporter, builder: Builde
209
212
 
210
213
  from nat.plugins.opentelemetry import OTLPSpanAdapterExporter
211
214
 
212
- api_token = config.api_token or os.environ.get("DBNL_API_TOKEN")
215
+ api_token = get_secret_value(config.api_token) if config.api_token else os.environ.get("DBNL_API_TOKEN")
213
216
  if not api_token:
214
217
  raise ValueError("API token is required for DBNL")
215
218
  project_id = config.project_id or os.environ.get("DBNL_PROJECT_ID")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nvidia-nat-opentelemetry
3
- Version: 1.4.0a20251029
3
+ Version: 1.4.0a20251030
4
4
  Summary: Subpackage for OpenTelemetry 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.0a20251029
19
+ Requires-Dist: nvidia-nat==v1.4.0a20251030
20
20
  Requires-Dist: opentelemetry-api~=1.2
21
21
  Requires-Dist: opentelemetry-exporter-otlp~=1.3
22
22
  Requires-Dist: opentelemetry-sdk~=1.3
@@ -4,14 +4,14 @@ nat/plugins/opentelemetry/otel_span.py,sha256=MC_ROZ8gSTu0gxRaaz77UDbn1ouZTZP3N_
4
4
  nat/plugins/opentelemetry/otel_span_exporter.py,sha256=YO7JsQgi8Cf2OQBJ_s78HwJjrWx9SdqMvPen3Pa2_bI,6533
5
5
  nat/plugins/opentelemetry/otlp_span_adapter_exporter.py,sha256=cWBfPKHET7U1oRMs1QMXvg-z1c1DaqYrLzHIyUUbfGM,4237
6
6
  nat/plugins/opentelemetry/otlp_span_redaction_adapter_exporter.py,sha256=YnoQlktT6EJRM7o8bhvYQcdGrAdOXNEk8wOimK_Wy88,7509
7
- nat/plugins/opentelemetry/register.py,sha256=u3Hq5mhnDfYn4Q-XkKCGr13xuM6SpS8d3OhroTUjiCc,10711
7
+ nat/plugins/opentelemetry/register.py,sha256=EZpGOYQ5FVXfwDUea8TfFqWgZnhGP9NFFb1oGFajk5I,11186
8
8
  nat/plugins/opentelemetry/span_converter.py,sha256=Gz3KvRNQeEBBlpaPO8YRAJkw4fmzV7m9bT6dGX0IV2E,8846
9
9
  nat/plugins/opentelemetry/mixin/__init__.py,sha256=Xs1JQ16L9btwreh4pdGKwskffAw1YFO48jKrU4ib_7c,685
10
10
  nat/plugins/opentelemetry/mixin/otlp_span_exporter_mixin.py,sha256=BN8fRHHEHEWZyrYoudl9lSeH--I2RY2dJVPyWIgDB0I,3454
11
- nvidia_nat_opentelemetry-1.4.0a20251029.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
12
- nvidia_nat_opentelemetry-1.4.0a20251029.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
13
- nvidia_nat_opentelemetry-1.4.0a20251029.dist-info/METADATA,sha256=3Vu8S1cXBK7cCMtq0eI5Pncl2ecJso--3dUIoUwT16s,2039
14
- nvidia_nat_opentelemetry-1.4.0a20251029.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- nvidia_nat_opentelemetry-1.4.0a20251029.dist-info/entry_points.txt,sha256=gmEKhCafyibUJLGxbn8luTK0UTgIvV2vAtr4uZ8M85I,72
16
- nvidia_nat_opentelemetry-1.4.0a20251029.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
17
- nvidia_nat_opentelemetry-1.4.0a20251029.dist-info/RECORD,,
11
+ nvidia_nat_opentelemetry-1.4.0a20251030.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
12
+ nvidia_nat_opentelemetry-1.4.0a20251030.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
13
+ nvidia_nat_opentelemetry-1.4.0a20251030.dist-info/METADATA,sha256=QxzBBBGg1D24iGwPwhonozJX8nvxRpWgQwvXwUD7jMk,2039
14
+ nvidia_nat_opentelemetry-1.4.0a20251030.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ nvidia_nat_opentelemetry-1.4.0a20251030.dist-info/entry_points.txt,sha256=gmEKhCafyibUJLGxbn8luTK0UTgIvV2vAtr4uZ8M85I,72
16
+ nvidia_nat_opentelemetry-1.4.0a20251030.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
17
+ nvidia_nat_opentelemetry-1.4.0a20251030.dist-info/RECORD,,