mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-16 15:42:40 +00:00
fix(otel): instrumentation providers do not need a config
This commit is contained in:
parent
8fe3a25158
commit
deedb3fb46
5 changed files with 59 additions and 36 deletions
|
|
@ -36,6 +36,9 @@ class OTelInstrumentationProvider(InstrumentationProvider):
|
|||
|
||||
def model_post_init(self, __context):
|
||||
"""Initialize OpenTelemetry after Pydantic validation."""
|
||||
# Provide default config if missing and validate type
|
||||
if getattr(self, "config", None) is None:
|
||||
self.config = OTelConfig()
|
||||
assert isinstance(self.config, OTelConfig) # Type hint for IDE/linter
|
||||
|
||||
# Warn if OTLP endpoints not configured
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue