Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
57abd5b to
b68a5c6
Compare
This comment has been minimized.
This comment has been minimized.
9e7c596 to
a2ea69c
Compare
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Pass compiled identity to the shared telemetry resource builder and stamp service.version even when no OTEL resource environment is present. Configure sandbox MCP token propagation through runtime defaults in CI. Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Scope config initialization bypasses to the root version and config schema commands. Use protobuf getters for config consumers, remove obsolete env setup and documentation, and isolate OTEL startup tests from cached SDK settings. Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
c0b4104 to
af28d3e
Compare
| "gateway" (dict "publicUrl" $apiURL "push" (dict)) | ||
| "runtimeDefaults" (dict "controlPlaneUrl" $apiURL "gatewayUrl" $apiURL) | ||
| -}} | ||
| {{- $config := mergeOverwrite $base (deepCopy .Values.config) -}} |
There was a problem hiding this comment.
Old otel.* values are now silently ignored, so upgrading with otel.traces.enabled=true turns all export off. How about adding a fail for .Values.otel, like rbac.clusterScoped, that points to config.telemetry and config.runtimeDefaults.telemetry.
| for _, signal := range signals { | ||
| resolved := c.signal(signal) | ||
| if !resolved.Enabled { | ||
| raw = tracing.ResourceEnvironment(telemetry.Environment(raw, cfg), resourceIdentity(identity)) |
There was a problem hiding this comment.
OTEL_SERVICE_NAME is gone and resourceIdentity has no service.name, so BYO SDKs report unknown_service. Let's add service.name=<agent> to the resource attributes here so an image's own OTEL_SERVICE_NAME still wins, and restore the dropped test assertion.
| for key, value := range opts.Config.ResourceAttributes { | ||
| detectors = append(detectors, resource.WithAttributes(attribute.String(key, value))) | ||
| } |
There was a problem hiding this comment.
File attributes come after opts.Defaults, so resourceAttributes: {service.name: x} or service.namespace overwrites every agent's identity. Reject these keys in the schema or move them into Identity.
| attributes[_SERVICE_NAMESPACE] = identity.agent_namespace | ||
| def _resource_attributes(identity: Identity, config: ExporterConfig) -> dict[str, str]: | ||
| attributes = {SERVICE_NAME: identity.agent_name, _SERVICE_NAMESPACE: identity.agent_namespace} | ||
| attributes.update(config.resource_attributes) |
There was a problem hiding this comment.
| def _install_providers(identity: Identity, config: ExporterConfig) -> None: | ||
| if os.getenv("OTEL_SDK_DISABLED", "").strip().lower() == "true": | ||
| return | ||
| OpenTelemetryConfigurator().configure( |
There was a problem hiding this comment.
The try/except around configure() was removed, so a bad value like OTEL_TRACES_EXPORTER=jaeger in Harness.spec.env now crashes the agent. Let's restore it so Python logs and continues like the Go runtimes.
| continue | ||
| } | ||
| if variable.Name == env.KagentAPIURL.Name() || claudeconfig.OwnsEnvironment(variable.Name) || translator.OwnsTelemetryEnvironment(variable.Name) { | ||
| if claudeconfig.OwnsEnvironment(variable.Name) { |
There was a problem hiding this comment.
Without OwnsTelemetryEnvironment, Harness.spec.env can turn on content capture or send OTLP to any endpoint, and egress opens to it. That means captureContent: false is no longer enforced. Let's keep capture under controller control.
| bindAddress: ":8443" | ||
| secure: true | ||
| telemetry: {} | ||
| runtimeDefaults: |
There was a problem hiding this comment.
Controller and runtime telemetry are now 2 blocks with no shared endpoint or resourceAttributes, so values like deployment.environment.name can drift apart. Let's default runtimeDefaults.telemetry from telemetry in the chart?
| {signal.vars.Protocol, env.OTELExporterOTLPProtocol, signal.config.Protocol}, | ||
| {signal.vars.Timeout, env.OTELExporterOTLPTimeout, strconv.FormatInt(signal.config.timeout().Milliseconds(), 10)}, | ||
| } { | ||
| if !supplied(option.generic.Name()) { |
There was a problem hiding this comment.
A generic env override replaces only half of the file's endpoint and protocol pair. With OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf and a file grpc endpoint, the SDK sends http/protobuf to :4317 with no /v1/traces. Let's treat endpoint and protocol as one unit.
| }{ | ||
| {signal.vars.Endpoint, env.OTELExporterOTLPEndpoint, signal.config.Endpoint}, | ||
| {signal.vars.Protocol, env.OTELExporterOTLPProtocol, signal.config.Protocol}, | ||
| {signal.vars.Timeout, env.OTELExporterOTLPTimeout, strconv.FormatInt(signal.config.timeout().Milliseconds(), 10)}, |
There was a problem hiding this comment.
Always writing TIMEOUT=10000 (the SDK default) plus per-signal endpoint and protocol gives BYO 16 OTEL_* entries, against Substrate's limit of 32. Skip the defaults, use generic vars when all signals match, and add BYO to the env budget test.
| if c.Exporters != nil { | ||
| cfg = *c.Exporters | ||
| } | ||
| raw = telemetry.Environment(raw, cfg) |
There was a problem hiding this comment.
This lists the sampler as a supported setting, but the "sampling belongs in the collector" line was removed from telemetry.md. SDK samplers set per Harness give partial traces, so let's restore that guidance.
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
| schema: kagent | ||
| vectorSchema: extensions | ||
| vectorEnabled: false | ||
| migrations: apply |
There was a problem hiding this comment.
I'm not a fan of this vs the previous skipMigrations: <bool> approach. Saw it while glancing through this as it's the area I've been in a lot lately. 🙂
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
|
Found 2 test failures on Blacksmith runners: Failures
Blacksmith runners detected OOM events on the following jobs:
|
Application settings are spread across env vars, which makes defaults and validation hard to follow. This PR moves the CLI and controller to explicit YAML/JSON configuration backed by protobuf schemas and Protovalidate.
configvalues into a mounted file and projects secret files separately.OTEL_*env vars override file defaults within each process. Controller overrides do not affect managed runtimes.This is a complete cutover, with no application env fallback or Kubernetes object metadata. Provider credentials, SDK inputs, and private runtime bootstrap payloads keep their existing interfaces.
The configuration documentation covers the schemas, precedence, and examples.
Validation: Go tests with the race detector excluding E2E, 311 Helm tests, and Helm lint pass locally. All CI checks pass, including Go/Python lint and tests, UI tests, protobuf and generated-artifact checks, and both gVisor and microVM E2E suites.
Replaces #3152 so follow-up PRs can stack on the branch in this repository.