Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move integration code out of the main opentelemetry crate #403

Closed
djc opened this issue Dec 29, 2020 · 11 comments
Closed

Move integration code out of the main opentelemetry crate #403

djc opened this issue Dec 29, 2020 · 11 comments

Comments

@djc
Copy link
Contributor

djc commented Dec 29, 2020

Into separate integration crates. This makes for more smaller crates, but makes sure we don't have dependencies in the core that we shouldn't have (which causes to have to upgrade in lockstep with their releases).

@djc
Copy link
Contributor Author

djc commented Dec 29, 2020

Things that probably qualify:

  • async-std
  • bincode?
  • regex?
  • tokio
  • tonic
  • reqwest
  • surf

@jtescher
Copy link
Member

👍 could also consider http and the testing utils as candidates

@TommyCpp
Copy link
Contributor

For proto definition. I'd suggest we move it to a separate it into separate crate(opentelemetry-proto maybe)? And support grpcio or tonic there.

@djc
Copy link
Contributor Author

djc commented Dec 30, 2020

If we need to support grpcio and tonic, those should probably be two separate crates IMO.

@djc
Copy link
Contributor Author

djc commented Jan 4, 2021

I spent the morning looking at this. The Injector and Extractor interfaces are tricky, because coherence requires that implementations for foreign types live in the same crate as the trait definitions. I did some experiments with using propagator types that implemented Extractor<T> (with T something like http::HeaderMap), but this clashes with the design of the global propagator, which cannot easily abstract over a particular type of propagator.

I did remove the regex dependency (#411, in favor of a small function that validates the trace state key) and moved bincode to dev-dependencies (#413, along with some other dependency management).

@djc
Copy link
Contributor Author

djc commented Jan 5, 2021

#415 moves the dependencies on http, reqwest and surf into a separate opentelemetry-http crate. At this point I'm inclined to leave tokio and async-std in, as they're pretty stable anyway (especially now that tokio has gone 1.0).

@jtescher
Copy link
Member

@djc is the work related to this issue complete? or should we keep this issue open

@TommyCpp
Copy link
Contributor

I want to mention that we need to update the doc in opentelemetry/lib.rs. Especially the Crate Feature Flags part.

//! ## Crate Feature Flags
//!
//! The following core crate feature flags are available:
//!
//! * `trace`: Includes the trace API and SDK (enabled by default).
//! * `metrics`: Includes the unstable metrics API and SDK.
//! * `serialize`: Adds [serde] serializers for common types.
//!
//! Support for recording and exporting telemetry asynchronously can be added
//! via the following flags:
//!
//! * `tokio-support`: Spawn telemetry tasks using [tokio]'s runtime.
//! * `async-std`: Spawn telemetry tasks using [async-std]'s runtime.
//!
//! Finally the following flags can be used by exporter authors:
//!
//! * `reqwest`: Implementation of [`HttpClient`] for [reqwest].
//! * `surf`: Implementation of [`HttpClient`] for [surf]`.
//!

@djc
Copy link
Contributor Author

djc commented Mar 2, 2021

@TommyCpp thanks for taking care of the documentation update.

I think this ticket is complete, closing.

@djc djc closed this as completed Mar 2, 2021
@TommyCpp
Copy link
Contributor

TommyCpp commented Mar 6, 2021

@jtescher @djc I don't think we published the opentelemetry-aws and opentelemetry-datadog. Should we do that?

@jtescher
Copy link
Member

jtescher commented Mar 6, 2021

@TommyCpp yeah I think we could probably cut a new release, want to prepare the changelogs?

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

No branches or pull requests

3 participants