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

zipkin json v2 endpoint #125

Closed
codefromthecrypt opened this issue Aug 6, 2024 · 5 comments
Closed

zipkin json v2 endpoint #125

codefromthecrypt opened this issue Aug 6, 2024 · 5 comments
Assignees

Comments

@codefromthecrypt
Copy link

In my free time, I still work on zipkin, and we have a ton of examples. While I like our server, for the type of work I do I prefer a text terminal. If otel-tui accepted the POST endpoint of zipkin spans (port 9411), I could look at the data pretty easily. Also people who haven't migrated to OTLP could use it, too.

Almost all users only use v2 json endpoint, so if you are interested you don't need the same level of sophistication as the collector

https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/23de1761434a8d069362cd233cbbbc77725def19/receiver/zipkinreceiver
https://github.com/openzipkin/brave-example
https://github.com/openzipkin/zipkin-api/blob/master/zipkin2-api.yaml#L60

@ymtdzzz
Copy link
Owner

ymtdzzz commented Aug 7, 2024

Thanks for your interesting suggestion! Support for multiple formats, including zipkin, makes otel-tui more convenient for developers using distributed tracing.
otel-tui is just an exporter, so I think it might be possible to combine it with receivers like zipkinreceiver (currently only otlp receiver is used). I'll give it a try this weekend today :)

@ymtdzzz ymtdzzz self-assigned this Aug 7, 2024
@ymtdzzz
Copy link
Owner

ymtdzzz commented Aug 7, 2024

IMO, it's enough to add zipkinreceiver to go.mod and call its Factory() with some yaml configurations just like: https://github.com/ymtdzzz/otel-tui/pull/126/files

yaml configurations in main.go looks like:

	rootCmd := &cobra.Command{
		Use:          params.BuildInfo.Command,
		Version:      params.BuildInfo.Version,
		SilenceUsage: true,
		RunE: func(cmd *cobra.Command, args []string) error {
			configContents := `yaml:
receivers:
+ zipkin:
  otlp:
    protocols:
      http:
        endpoint: ` + hostFlag + `:` + strconv.Itoa(httpPortFlag) + `
      grpc:
        endpoint: ` + hostFlag + `:` + strconv.Itoa(grpcPortFlag) + `

processors:

exporters:
  tui:

service:
  pipelines:
    traces:
-     receivers: [otlp]
+     receivers: [otlp, zipkin]
      processors: []
      exporters: [tui]
    logs:
      receivers: [otlp]
      processors: []
      exporters: [tui]
    metrics:
      receivers: [otlp]
      processors: []
      exporters: [tui]
`

@ymtdzzz
Copy link
Owner

ymtdzzz commented Aug 7, 2024

@codefromthecrypt, I've created a PR to support zipkin: #127
Does it look like what you imagine?

@ymtdzzz
Copy link
Owner

ymtdzzz commented Aug 11, 2024

From v0.3.0, the zipkin receiver (on the port 9411) has been supported!
Please create an issue or reopen this if any problems :)

@ymtdzzz ymtdzzz closed this as completed Aug 11, 2024
@codefromthecrypt
Copy link
Author

looks beautiful. thanks @ymtdzzz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

2 participants