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

Separating formatters from exporters #105

Open
thefotios opened this issue Jan 20, 2018 · 1 comment
Open

Separating formatters from exporters #105

thefotios opened this issue Jan 20, 2018 · 1 comment

Comments

@thefotios
Copy link

Hi, I started using this for some projects yesterday and definitely love it. I needed to make a few fixes (which I'll be submitting PRs for this weekend), but this definitely fits into it. I had 2 ideas I wanted to run by you before embarking on them.

I think it would make sense to separate the formatting from the exporting. That would allow flexibility to say "format this as Zipkin, but print to the screen/file". We could make this transparent to the user by each exporter having a default formatter and also ensuring compatibility (eg, the StackDriver exporter can only use the StackDriver formatter).

Down the road, this could allow a much simpler pattern for different endpoints to be totally separate subpackages/plugins for each exporter (eg, you would explicitly pip install opencensus-python[stackdriver]).

@liyanhui1228
Copy link
Contributor

Hi @thefotios, thanks for opening this issue! Your idea for creating a formatter class and separating the logic of formatting spans for different exporters sounds good to me, and appreciate it if you have started working on it. And for separating subpackages/plugins, this is also worth doing. But restructure the distribution model is somewhat a big change, let's work on separating the formatters first and then see how we could make subpackages for stackdriver.

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

2 participants