Add OpenTelemetry API to the in-process container test classpath - MERGEOK#37251
Merged
Merged
Conversation
OpenTelemetryProvider (implements Provider<OpenTelemetry>) is registered in every container's component graph. Building any in-process container graph reflects the provider's generic interface (ComponentNode.componentType -> Class.getGenericInterfaces), which requires io.opentelemetry.api.OpenTelemetry on the classpath. The API was added to container-dev but not to the user-facing in-process test framework (the application module), so sample-app / tenant tests that boot a container via com.yahoo.application.Application fail with: TypeNotPresentException: Type io.opentelemetry.api.OpenTelemetry not present Caused by: ClassNotFoundException: io.opentelemetry.api.OpenTelemetry Add opentelemetry-api to the application module (it transitively brings -context and -common) and allow the three artifacts at test scope in container-dependencies-enforcer (kept in sync with the cloud and hosted tenant-base dependency enforcers). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bjorncs
approved these changes
Jun 18, 2026
esolitos
added a commit
that referenced
this pull request
Jun 22, 2026
* origin/master: (55 commits) Optimize sameElement over multivalue Allow configuring ONNX graph optimization for ONNX embedders metrics-proxy: add osVersion to the alive metric via a config-driven host-dimension mapping (#37254) Allow configuring optimization for ONNX models in services.xml Restrict tensorFromLabelsWithOffset to array attributes Use float cell type for tensorFromLabelsWithOffset Restrict tensorFromLabelsWithOffset to attribute source Add estimated flush duration to flush target interface. Add tensorFromLabelsWithOffset rank feature tweak abs cost of always_strict complex leafs Add method for getting only tenants with applications Use std::format Make ONNX graph optimization configurable per model (default off) Add OpenTelemetry API to the in-process container test classpath (#37251) Add dot product computation between two quantized vectors Expose disk index flush duration in proton state explorer. Expose reserved memory in proton state explorer. Install telemetry.def so the config server can resolve it (#37246) Expose reserved memory metric. Revert "Revert "Revert "Revert "Add OpenTelemetry tracing provider to the con…" (#37244) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
OpenTelemetryProvider(implements Provider<OpenTelemetry>) is registered in every container's component graph. Building any in-process container graph (e.g. viacom.yahoo.application.Application, used by sample-app and tenant tests) makesComponentGraphreflect the provider's generic interface —ComponentNode.componentType()→Class.getGenericInterfaces()— which must loadio.opentelemetry.api.OpenTelemetry.The API was added to
container-dev(so vespa's own in-process tests pass) but not to the user-facing in-process test framework, theapplicationmodule. So tenant / sample-app tests that boot a container fail:(In a real deployment the
container-opentelemetrypre-installed bundle supplies the API via OSGi; the flat in-process test classpath has no such mechanism.)Fix
application/pom.xml: addopentelemetry-apito the test-visible dependencies (it transitively brings-contextand-common).container-dependencies-enforcer/pom.xml: allowopentelemetry-api/-common/-contextattestscope.The enforcer allow-list is kept in sync with the cloud and hosted tenant-base dependency enforcers (the poms note this requirement). Those companion PRs are listed below and should merge together with this one.
🤖 Generated with Claude Code
Related PRs (merge together)