Skip to content

Conversation

@matej-g
Copy link
Contributor

@matej-g matej-g commented Oct 2, 2020

In line with the aim stated in the #161, the instrumentation packages should be made more lightweight by removing the dependency on the main SDK package (go.opentelemetry.io/otel/sdk). In order achieve it, this changeset:

  • Separates instrumentation examples (which usually depending on importing SDK in order to setup export pipeline) into individual modules, which removes dependency on SDK from the main instrumentation module.
  • Adjusts gocql metric tests, which previously depended on SDK - this has been replaced by internal mock for metrics

Additionally, dependabot configuration has been updated to reflect his, as well as .gitignore to ignore binaries built by example modules.

Resolves #161

Matej Gera added 4 commits October 2, 2020 10:17
- Create separate go.mod for intrumentation examples
- Update and clean-up go.mod files for instrumentation
- Use replace directive to on-disk location where appropriate
- replace SDK with internal trace test helper package
"github.com/gocql/gocql"
"github.com/stretchr/testify/assert"

mockmeter "go.opentelemetry.io/contrib/internal/metric"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm aware that that these test helpers are now available in the main OTEL repo (related to discussion in #190 (comment)).

I wanted to open a ticket to replace these internal helpers with the ones from the OTEL repo, however I noticed that opentelemetry-go-contrib has also own internal helpers for tracer, even though these existed already in the OTEL repo.

Is there a reason for this duplicity or should tracer test helpers be replaced by the helpers from OTEL repo as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to open a ticket to replace these internal helpers with the ones from the OTEL repo, however I noticed that opentelemetry-go-contrib has also own internal helpers for tracer, even though these existed already in the OTEL repo.

Is there a reason for this duplicity or should tracer test helpers be replaced by the helpers from OTEL repo as well?

No, we should unify on a single implementation in the otel repo IMO. I think the duplicity came from the concurrent development of both testing libraries more than an explicit choice. Unifying will avoid drift in implementation and avoid uncertainty by future development on which package to use.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, created #385 to track it.

Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. Excited to see all the cleanup in the instrumentation dependencies!

Just some bookkeeping issues with the go.mod file replace declarations.

"github.com/gocql/gocql"
"github.com/stretchr/testify/assert"

mockmeter "go.opentelemetry.io/contrib/internal/metric"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to open a ticket to replace these internal helpers with the ones from the OTEL repo, however I noticed that opentelemetry-go-contrib has also own internal helpers for tracer, even though these existed already in the OTEL repo.

Is there a reason for this duplicity or should tracer test helpers be replaced by the helpers from OTEL repo as well?

No, we should unify on a single implementation in the otel repo IMO. I think the duplicity came from the concurrent development of both testing libraries more than an explicit choice. Unifying will avoid drift in implementation and avoid uncertainty by future development on which package to use.

@Aneurysm9 Aneurysm9 merged commit 89ae255 into open-telemetry:master Oct 5, 2020
@Aneurysm9 Aneurysm9 mentioned this pull request Oct 9, 2020
@pellared pellared added this to the untracked milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decouple instrumentation from default SDK

4 participants