Skip to content

Add unit/integration tests coverage for opentelemetry tracing support #7493

@swagatbora90

Description

@swagatbora90

What is the problem you're trying to solve

Containerd has opentelemetry trace support, but currently there are no unit tests or integration tests related to otel plugin nor tests around individual spans.

This can include:

  1. Testing the otel SDK
  2. Testing manual instrumentation

There is helper package available already https://pkg.go.dev/go.opentelemetry.io/otel/sdk/trace/tracetest

Having proper testing will help verify otel trace behavior and detect any regression

Describe the solution you'd like

We need to first add some test coverage for the Otel SDK related methods and then extend testing across instrumented spans.

  • Unit tests around newExporter and newTracer
  • For spans, we can use tracetest to create in memory exporter and verify span and attributes in places where we instrument spans

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions