tests
checks for the otel daggerverse module.Installation
dagger install github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453Entrypoint
Return Type
Tests Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
func (m *MyModule) Example() *dagger.Tests {
return dag.
Tests()
}@function
def example() -> dagger.Tests:
return (
dag.tests()
)@func()
example(): Tests {
return dag
.tests()
}Types
Tests 🔗
all() 🔗
All runs every otel test inside this suite as a convenience for local
dagger call all invocations. CI does NOT call All: each of the three
sub-aggregators below (Validation, Core, Contrib) carries its own
+check directive, so GH Actions schedules each onto its own runner
in parallel — running All on top would double-bill the same work.
collectorTag picks the otel/opentelemetry-collector{,-contrib} tag every spawned collector runs against; lokiTag/tempoTag/mimirTag pick the grafana/{loki,tempo,mimir} tags for the round-trip backends.
parallel caps how many tests run concurrently. Defaults to 0 (unbounded).
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| collectorTag | String ! | "0.130.1" | No description provided |
| lokiTag | String ! | "3.4.1" | No description provided |
| tempoTag | String ! | "2.7.1" | No description provided |
| mimirTag | String ! | "2.15.1" | No description provided |
| parallel | Integer ! | 0 | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
all --collector-tag string --loki-tag string --tempo-tag string --mimir-tag string --parallel integerfunc (m *MyModule) Example(ctx context.Context, collectorTag string, lokiTag string, tempoTag string, mimirTag string, parallel int) {
return dag.
Tests().
All(ctx, collectorTag, lokiTag, tempoTag, mimirTag, parallel)
}@function
async def example(collectortag: str, lokitag: str, tempotag: str, mimirtag: str, parallel: int) -> None:
return await (
dag.tests()
.all(collectortag, lokitag, tempotag, mimirtag, parallel)
)@func()
async example(collectorTag: string, lokiTag: string, tempoTag: string, mimirTag: string, parallel: number): Promise<void> {
return dag
.tests()
.all(collectorTag, lokiTag, tempoTag, mimirTag, parallel)
}bindsCollectorIntoFreshContainer() 🔗
BindsCollectorIntoFreshContainer asserts that a collector configured with the DebugPipeline can be reached on :4317 and :4318 from a vanilla alpine container via WithServiceBinding.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| collectorTag | String ! | "0.130.1" | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
binds-collector-into-fresh-container --collector-tag stringfunc (m *MyModule) Example(ctx context.Context, collectorTag string) {
return dag.
Tests().
Bindscollectorintofreshcontainer(ctx, collectorTag)
}@function
async def example(collectortag: str) -> None:
return await (
dag.tests()
.bindscollectorintofreshcontainer(collectortag)
)@func()
async example(collectorTag: string): Promise<void> {
return dag
.tests()
.bindsCollectorIntoFreshContainer(collectorTag)
}conflictingComponentBodiesAreRejected() 🔗
ConflictingComponentBodiesAreRejected asserts that wiring two distinct *CustomExporter instances sharing the same / but with different bodies into the pipeline graph surfaces a non-nil error from the rendered-config path, rather than silently keeping whichever was registered first.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| collectorTag | String ! | "0.130.1" | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
conflicting-component-bodies-are-rejected --collector-tag stringfunc (m *MyModule) Example(ctx context.Context, collectorTag string) {
return dag.
Tests().
Conflictingcomponentbodiesarerejected(ctx, collectorTag)
}@function
async def example(collectortag: str) -> None:
return await (
dag.tests()
.conflictingcomponentbodiesarerejected(collectortag)
)@func()
async example(collectorTag: string): Promise<void> {
return dag
.tests()
.conflictingComponentBodiesAreRejected(collectorTag)
}contrib() 🔗
Contrib runs the otel-collector-contrib-image round-trip tests.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| collectorTag | String ! | "0.130.1" | No description provided |
| lokiTag | String ! | "3.4.1" | No description provided |
| parallel | Integer ! | 0 | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
contrib --collector-tag string --loki-tag string --parallel integerfunc (m *MyModule) Example(ctx context.Context, collectorTag string, lokiTag string, parallel int) {
return dag.
Tests().
Contrib(ctx, collectorTag, lokiTag, parallel)
}@function
async def example(collectortag: str, lokitag: str, parallel: int) -> None:
return await (
dag.tests()
.contrib(collectortag, lokitag, parallel)
)@func()
async example(collectorTag: string, lokiTag: string, parallel: number): Promise<void> {
return dag
.tests()
.contrib(collectorTag, lokiTag, parallel)
}contribForwardsLogsToLoki() 🔗
ContribForwardsLogsToLoki — smoke check on the contrib distribution.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| collectorTag | String ! | "0.130.1" | No description provided |
| lokiTag | String ! | "3.4.1" | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
contrib-forwards-logs-to-loki --collector-tag string --loki-tag stringfunc (m *MyModule) Example(ctx context.Context, collectorTag string, lokiTag string) {
return dag.
Tests().
Contribforwardslogstoloki(ctx, collectorTag, lokiTag)
}@function
async def example(collectortag: str, lokitag: str) -> None:
return await (
dag.tests()
.contribforwardslogstoloki(collectortag, lokitag)
)@func()
async example(collectorTag: string, lokiTag: string): Promise<void> {
return dag
.tests()
.contribForwardsLogsToLoki(collectorTag, lokiTag)
}core() 🔗
Core runs the otel-collector core-image round-trip tests. Each test boots one Loki/Tempo/Mimir alongside the collector, so this group’s per-runner footprint is the heaviest in the suite.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| collectorTag | String ! | "0.130.1" | No description provided |
| lokiTag | String ! | "3.4.1" | No description provided |
| tempoTag | String ! | "2.7.1" | No description provided |
| mimirTag | String ! | "2.15.1" | No description provided |
| parallel | Integer ! | 0 | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
core --collector-tag string --loki-tag string --tempo-tag string --mimir-tag string --parallel integerfunc (m *MyModule) Example(ctx context.Context, collectorTag string, lokiTag string, tempoTag string, mimirTag string, parallel int) {
return dag.
Tests().
Core(ctx, collectorTag, lokiTag, tempoTag, mimirTag, parallel)
}@function
async def example(collectortag: str, lokitag: str, tempotag: str, mimirtag: str, parallel: int) -> None:
return await (
dag.tests()
.core(collectortag, lokitag, tempotag, mimirtag, parallel)
)@func()
async example(collectorTag: string, lokiTag: string, tempoTag: string, mimirTag: string, parallel: number): Promise<void> {
return dag
.tests()
.core(collectorTag, lokiTag, tempoTag, mimirTag, parallel)
}coreForwardsLogsToLoki() 🔗
CoreForwardsLogsToLoki asserts a Core collector forwards an OTLP/HTTP log push through to the grafana-stack Loki backend, where it is queryable via LogQL.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| collectorTag | String ! | "0.130.1" | No description provided |
| lokiTag | String ! | "3.4.1" | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
core-forwards-logs-to-loki --collector-tag string --loki-tag stringfunc (m *MyModule) Example(ctx context.Context, collectorTag string, lokiTag string) {
return dag.
Tests().
Coreforwardslogstoloki(ctx, collectorTag, lokiTag)
}@function
async def example(collectortag: str, lokitag: str) -> None:
return await (
dag.tests()
.coreforwardslogstoloki(collectortag, lokitag)
)@func()
async example(collectorTag: string, lokiTag: string): Promise<void> {
return dag
.tests()
.coreForwardsLogsToLoki(collectorTag, lokiTag)
}coreForwardsMetricsToMimir() 🔗
CoreForwardsMetricsToMimir asserts an OTLP/HTTP metric pushed to the collector lands in Mimir via the OTLP/HTTP exporter and is queryable via the Prometheus API.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| collectorTag | String ! | "0.130.1" | No description provided |
| mimirTag | String ! | "2.15.1" | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
core-forwards-metrics-to-mimir --collector-tag string --mimir-tag stringfunc (m *MyModule) Example(ctx context.Context, collectorTag string, mimirTag string) {
return dag.
Tests().
Coreforwardsmetricstomimir(ctx, collectorTag, mimirTag)
}@function
async def example(collectortag: str, mimirtag: str) -> None:
return await (
dag.tests()
.coreforwardsmetricstomimir(collectortag, mimirtag)
)@func()
async example(collectorTag: string, mimirTag: string): Promise<void> {
return dag
.tests()
.coreForwardsMetricsToMimir(collectorTag, mimirTag)
}coreForwardsTracesToTempo() 🔗
CoreForwardsTracesToTempo asserts an OTLP/HTTP trace pushed to the collector lands in Tempo via the OTLP/gRPC exporter.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| collectorTag | String ! | "0.130.1" | No description provided |
| tempoTag | String ! | "2.7.1" | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
core-forwards-traces-to-tempo --collector-tag string --tempo-tag stringfunc (m *MyModule) Example(ctx context.Context, collectorTag string, tempoTag string) {
return dag.
Tests().
Coreforwardstracestotempo(ctx, collectorTag, tempoTag)
}@function
async def example(collectortag: str, tempotag: str) -> None:
return await (
dag.tests()
.coreforwardstracestotempo(collectortag, tempotag)
)@func()
async example(collectorTag: string, tempoTag: string): Promise<void> {
return dag
.tests()
.coreForwardsTracesToTempo(collectorTag, tempoTag)
}customComponentBodyIsSpliced() 🔗
CustomComponentBodyIsSpliced asserts that a Custom* component’s caller-supplied YAML body lands structurally under the rendered config (not as a quoted scalar).
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| collectorTag | String ! | "0.130.1" | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
custom-component-body-is-spliced --collector-tag stringfunc (m *MyModule) Example(ctx context.Context, collectorTag string) {
return dag.
Tests().
Customcomponentbodyisspliced(ctx, collectorTag)
}@function
async def example(collectortag: str) -> None:
return await (
dag.tests()
.customcomponentbodyisspliced(collectortag)
)@func()
async example(collectorTag: string): Promise<void> {
return dag
.tests()
.customComponentBodyIsSpliced(collectorTag)
}debugPipelineAcceptsOtlpPush() 🔗
DebugPipelineAcceptsOtlpPush asserts a collector configured with DebugPipeline(“logs”) accepts an OTLP/HTTP log push without erroring (HTTP 200⁄204).
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| collectorTag | String ! | "0.130.1" | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
debug-pipeline-accepts-otlp-push --collector-tag stringfunc (m *MyModule) Example(ctx context.Context, collectorTag string) {
return dag.
Tests().
Debugpipelineacceptsotlppush(ctx, collectorTag)
}@function
async def example(collectortag: str) -> None:
return await (
dag.tests()
.debugpipelineacceptsotlppush(collectortag)
)@func()
async example(collectorTag: string): Promise<void> {
return dag
.tests()
.debugPipelineAcceptsOtlpPush(collectorTag)
}rejectsInvalidComponentName() 🔗
RejectsInvalidComponentName asserts every component factory and the Custom* escape hatches reject empty / non-conforming names (and non-conforming kinds, where applicable) with a non-nil error.
Return Type
Void ! Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
rejects-invalid-component-namefunc (m *MyModule) Example(ctx context.Context) {
return dag.
Tests().
Rejectsinvalidcomponentname(ctx)
}@function
async def example() -> None:
return await (
dag.tests()
.rejectsinvalidcomponentname()
)@func()
async example(): Promise<void> {
return dag
.tests()
.rejectsInvalidComponentName()
}rejectsUnknownPipelineSignal() 🔗
RejectsUnknownPipelineSignal asserts Otel.Pipeline rejects signals outside {logs, traces, metrics}, and Otel.DebugPipeline does the same.
Return Type
Void ! Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
rejects-unknown-pipeline-signalfunc (m *MyModule) Example(ctx context.Context) {
return dag.
Tests().
Rejectsunknownpipelinesignal(ctx)
}@function
async def example() -> None:
return await (
dag.tests()
.rejectsunknownpipelinesignal()
)@func()
async example(): Promise<void> {
return dag
.tests()
.rejectsUnknownPipelineSignal()
}serviceWithoutPipelinesOrConfigFails() 🔗
ServiceWithoutPipelinesOrConfigFails asserts that calling Service() on a collector with no pipelines and no override produces a container whose exec exits non-zero — the collector binary refuses to start without –config.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| collectorTag | String ! | "0.130.1" | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
service-without-pipelines-or-config-fails --collector-tag stringfunc (m *MyModule) Example(ctx context.Context, collectorTag string) {
return dag.
Tests().
Servicewithoutpipelinesorconfigfails(ctx, collectorTag)
}@function
async def example(collectortag: str) -> None:
return await (
dag.tests()
.servicewithoutpipelinesorconfigfails(collectortag)
)@func()
async example(collectorTag: string): Promise<void> {
return dag
.tests()
.serviceWithoutPipelinesOrConfigFails(collectorTag)
}sharedReceiverIsDedupedInRenderedYaml() 🔗
SharedReceiverIsDedupedInRenderedYaml asserts that wiring one receiver into three pipelines emits a single top-level receivers.otlp/primary entry rather than three.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| collectorTag | String ! | "0.130.1" | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
shared-receiver-is-deduped-in-rendered-yaml --collector-tag stringfunc (m *MyModule) Example(ctx context.Context, collectorTag string) {
return dag.
Tests().
Sharedreceiverisdedupedinrenderedyaml(ctx, collectorTag)
}@function
async def example(collectortag: str) -> None:
return await (
dag.tests()
.sharedreceiverisdedupedinrenderedyaml(collectortag)
)@func()
async example(collectorTag: string): Promise<void> {
return dag
.tests()
.sharedReceiverIsDedupedInRenderedYaml(collectorTag)
}validation() 🔗
Validation runs the otel validation + rendering tests that don’t need a backend service stood up. Pure-unit + collector-only spin-ups.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| collectorTag | String ! | "0.130.1" | No description provided |
| parallel | Integer ! | 0 | No description provided |
Example
dagger -m github.com/z5labs/devex/daggerverse/otel/tests@a17bf411228ae3d544c7c18bcf08dd04c295d453 call \
validation --collector-tag string --parallel integerfunc (m *MyModule) Example(ctx context.Context, collectorTag string, parallel int) {
return dag.
Tests().
Validation(ctx, collectorTag, parallel)
}@function
async def example(collectortag: str, parallel: int) -> None:
return await (
dag.tests()
.validation(collectortag, parallel)
)@func()
async example(collectorTag: string, parallel: number): Promise<void> {
return dag
.tests()
.validation(collectorTag, parallel)
}