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

Adding a tracer provider #24

Merged
merged 47 commits into from
Mar 17, 2020
Merged

Conversation

lykkin
Copy link
Contributor

@lykkin lykkin commented Jan 7, 2020

There seems to be some movement on implementing things from spans up, so I thought I would start building from the tracer factory down.

This currently requires C++14 for its use of unique_ptrs. I know there was some talk about wanting to limit the standard to C++11, but not sure how hard this requirement is.

@lykkin
Copy link
Contributor Author

lykkin commented Jan 7, 2020

I signed it

@reyang
Copy link
Member

reyang commented Jan 7, 2020

It'll be great to point to the specification.
As what we have today, the spec is using TracerFactory and getTracer.
Also it'll be helpful to clarify the thread-safety requirement.

@lykkin lykkin requested review from jmacd and reyang January 7, 2020 21:42
@SaintDubious
Copy link

How Serious are we about the "header only" requirement specified here: https://github.com/open-telemetry/opentelemetry-cpp/blob/master/docs/requirements.md

@g-easy
Copy link
Contributor

g-easy commented Jan 9, 2020

tracer-factory.h

Should this be tracer_factory.h with an underscore, to match e.g. string_view.h?

@lykkin
Copy link
Contributor Author

lykkin commented Jan 9, 2020

tracer-factory.h

Should this be tracer_factory.h with an underscore, to match e.g. string_view.h?

Good call, will change.

jmacd
jmacd previously requested changes Jan 9, 2020
sdk/include/opentelemetry/sdk/trace/tracer_factory.h Outdated Show resolved Hide resolved
@lykkin lykkin force-pushed the tracer-registry branch 2 times, most recently from 4ef274d to 8393c4d Compare January 14, 2020 16:43
@jmacd
Copy link

jmacd commented Jan 14, 2020

This looks good. One nit: open-telemetry/oteps#76 says that we'll standardize on the term "Provider" instead or "Factory".

@lykkin
Copy link
Contributor Author

lykkin commented Jan 14, 2020

This looks good. One nit: open-telemetry/oteps#76 says that we'll standardize on the term "Provider" instead or "Factory".

Thanks, I'll update that.

What do you think about making the return value of GetTracerFactory a shared_ptr<TracerFactory>? Since users can construct factories outside the global scope and pass it in, there's some questionable ownership of that pointer at that point. I can either add that in as part of this PR or make a quick follow on PR after this gets merged. I'd prefer the latter, as I would need to make nostd::shared_ptr for the ABI compat restriction.

api/BUILD Outdated Show resolved Hide resolved
@pyohannes
Copy link
Contributor

@reyang: I just rebased the branch.

@reyang reyang merged commit 752adcf into open-telemetry:master Mar 17, 2020
@pyohannes pyohannes mentioned this pull request Jun 10, 2020
0x4b pushed a commit to 0x4b/opentelemetry-cpp that referenced this pull request Aug 19, 2020
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.

7 participants