Skip to content

otlp*http modules import grpc #2579

@MadVikingGod

Description

@MadVikingGod

Description

This was surfaced in the discussion:#2509

The otlptracehttp client and otlptrace depend on grpc. This is a transitive dependency from internal/otlpconfig. This is counter to why we split these packages into separate mods in the first place.

Environment

  • OS: [e.g. iOS]
  • Architecture: [e.g. x86, i386]
  • Go Version: [e.g. 1.15]
  • opentelemetry-go version: [e.g. v0.14.0, 3c7face]

Steps To Reproduce

  1. cd exporters/otlp/otlptrace/otlptracehttp
  2. go mod graph | grep grpc this should be empty
  3. go mod why google.golang.org/grpc this should report that module does not need grpc.

Expected behavior

The HTTP client should not depend on grpc.

Aditional information

otlpconfig has a config struct that is shared between HTTP client and grpc. This has logic around extracting the variables from the environment. Because the config has settings for grpc this means importing otlpconfig will import grpc (even if they are later pruned).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:logsPart of OpenTelemetry logsarea:metricsPart of OpenTelemetry Metricsarea:tracePart of OpenTelemetry tracingbugSomething isn't workingpkg:exporter:otlpRelated to the OTLP exporter package

    Type

    No type

    Projects

    Status

    Low priority

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions