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

How to combine two service #1609

Open
caibirdme opened this issue Jan 24, 2024 · 2 comments
Open

How to combine two service #1609

caibirdme opened this issue Jan 24, 2024 · 2 comments

Comments

@caibirdme
Copy link

Opentelemetry Defines three different services:

  • common package contains the common messages shared between different services.
  • trace package contains the Trace Service protos.
  • metrics package contains the Metrics Service protos.
  • logs package contains the Logs Service protos.

I want to know if there's a way to combine those services into one service(Maybe write a new service and don't use those three service definitions?), thus server just needs to listen only one tcp port, and client can send different data to the same server

@matze
Copy link
Contributor

matze commented Jan 25, 2024

You can call add_service() as often as you like.

@caibirdme
Copy link
Author

Thx. BTW, are there any examples for using transport::Routes? It seems that I can do Routes::new(svc1).add_service(svc2), But Builder::new().add_service(routes) cannot compile, it requires the Error to be Infillable while the Error of Routes is Box<dyn Error>

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