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

Add optional Tracer to appcommon.Config #14

Merged
merged 5 commits into from
Feb 7, 2023
Merged

Conversation

leveyjam
Copy link
Contributor

@leveyjam leveyjam commented Feb 6, 2023

Add the ability to pass an opentracing.Tracer via appcommon.Config.Tracer

We are using harness.go as the basis for the Faro Endpoint, and we would like to configure the OpenTracing->OTel bridge tracer for use in our code ( https://github.com/grafana/app-o11y-kwl-endpoint/blob/main/cmd/kwl/main.go )

@rlankfo authored the 1st commit. I've attempted to add a test to show the behavior is correct.
I will squash the commits before merging if that is preferred?

@CLAassistant
Copy link

CLAassistant commented Feb 6, 2023

CLA assistant check
All committers have signed the CLA.

@leveyjam leveyjam marked this pull request as ready for review February 6, 2023 18:31
@leveyjam leveyjam requested a review from ywwg February 6, 2023 18:32
Copy link
Contributor

@ywwg ywwg left a comment

Choose a reason for hiding this comment

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

Yes, we usually squash commits during merge unless there are very large, disparate changes that make sense to be separated

pkg/appcommon/harness.go Outdated Show resolved Hide resolved
pkg/appcommon/harness_test.go Outdated Show resolved Hide resolved
pkg/appcommon/harness.go Outdated Show resolved Hide resolved
@ywwg
Copy link
Contributor

ywwg commented Feb 6, 2023

thank you for this! I made a few minor style notes, but it looks fine and straightforward

leveyjam and others added 2 commits February 6, 2023 19:59
Co-authored-by: Owen Williams <owen-github@ywwg.com>
@leveyjam
Copy link
Contributor Author

leveyjam commented Feb 6, 2023

Thanks for the swift response @ywwg ! I've accepted your changes + renamed "tearDown" -> "resetTracingGlobals" (I think that explains the purpose of the function and makes it a little bit self-documenting).

@leveyjam leveyjam requested a review from ywwg February 6, 2023 19:14
Copy link
Contributor

@ywwg ywwg left a comment

Choose a reason for hiding this comment

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

thanks for the quick fixes -- now that I understand the call behavior better, I want to tweak the invocation slightly.

pkg/appcommon/harness.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ywwg ywwg 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, thanks!

@leveyjam leveyjam merged commit 063a64d into main Feb 7, 2023
@leveyjam leveyjam deleted the leveyjam/config-tracer branch February 7, 2023 17:10
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.

None yet

3 participants