Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Add some documentation on how to use this #7

Open
djc opened this issue Oct 15, 2020 · 6 comments
Open

Add some documentation on how to use this #7

djc opened this issue Oct 15, 2020 · 6 comments

Comments

@djc
Copy link
Contributor

djc commented Oct 15, 2020

I have just gotten tracing set up for the first time, exporting my traces to Jaeger locally for testing. Now I would like to build out support for inspecting traces in production, with my application running in GCP. I think your crate can help with this, but I'm pretty unclear on how to set it up. If you can provide some hints, I'd be happy to flesh that out into documentation for this crate (and bump it to the latest version of upstream crates where useful).

@Xaeroxe
Copy link
Contributor

Xaeroxe commented Nov 6, 2020

Hey, here's a couple things that might help you.

https://vivint-smarthome.github.io/opentelemetry-stackdriver/opentelemetry_stackdriver/

https://github.com/vivint-smarthome/opentelemetry-stackdriver/blob/master/examples/basic.rs

If you feel those aren't sufficient maybe we can talk about how it could be improved.

@djc
Copy link
Contributor Author

djc commented Nov 6, 2020

I found that pretty sparse. It would be great to have a little documentation on the SpanExporter::connect() method that explains what the arguments do and how it fits together. In the meantime, I've made some progress on figuring it out for myself.

Which leads me to another question: given that it took 22 days to respond to this issue, and #10 hasn't had a response for 8 days, I was wondering what the intention/motivation around open sourcing this code is? For my current work project I need a good solution to get tracing data into Cloud Trace, and I could work on this crate, but in the end it's not a lot of code and I could easily fork it. Would you be able to provide code reviews, or alternatively make me a co-maintainer?

@Xaeroxe
Copy link
Contributor

Xaeroxe commented Nov 6, 2020

The motivation for open sourcing this was a desire to prevent others from having to repeat the work I did. I apologize for not being very responsive, my work schedule is pretty full as of late and this project is merely one cog in the greater whole I maintain. I saw #10 when it went up, but reviewing it had to go down on the priority list because it was non-trivial to review and I had higher priorities. You're welcome to fork this crate, I won't have any hard feelings about it.

@djc
Copy link
Contributor Author

djc commented Nov 6, 2020

All other things equal, I'd prefer to work together to make this crate useful and preventing yet more others from having to duplicate our work. Do you think that is achievable, or will your work schedule make it harder to move forward? Or, should I just accumulate potential changes and will you potentially have some time to review them in the future?

@Xaeroxe
Copy link
Contributor

Xaeroxe commented Nov 6, 2020

It's likely I'll have time to review it in the future yes. That works for me.

@ErichDonGubler
Copy link

ErichDonGubler commented Nov 6, 2020

Because the sequence of steps and types to walk through is complicated, perhaps the best way to approach this might be with a step-by-step example? This could be implemented with a doctest, which would have the benefit of being type-checked...that is, once this gets resolved:

#![cfg(not(doctest))]
// unfortunately the proto code includes comments from the google proto files
// that are interpreted as "doc tests" and will fail to build.
// When this PR is merged we should be able to remove this attribute:
// https://github.com/danburkert/prost/pull/291

I've given it a shot at #12, adapting the basic example to have local imports (to make the source of symbols abundantly clear) and changing the code's style to be as incremental as possible. What do you think, @djc? :)

ErichDonGubler added a commit to ErichDonGubler/opentelemetry-stackdriver that referenced this issue Nov 7, 2020
New commit message:

This shouldn't be the place where documentation stops being written
(which is being discussed in vivint-smarthome#7), but it might be a good start. This is
very similar to code you can already find in this repo's
[`examples/basic.rs`][basic-example] and documentation in other places,
like [the doc example for
`tracing_opentelemetry::OpenTelemetryLayer::new`][open_telemetry_layer-new].
The focus of these docs, though, is to demonstrate the usage of the API
in an incremental style, so that single steps are as easy as possible to
understand.

[basic-example]: https://github.com/vivint-smarthome/opentelemetry-stackdriver/blob/102ab6242a891798a8316db5f7bfca463c818507/examples/basic.rs
[open_telemetry_layer-new]: https://docs.rs/tracing-opentelemetry/0.8.0/tracing_opentelemetry/struct.OpenTelemetryLayer.html#examples
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants