-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 JSON input to zipkin plugin #3150
Conversation
return nil, fmt.Errorf("No value for key %s at binaryAnnotations[%d]", a.K, i) | ||
} | ||
if a.Value() != "" && a.Key() == "" { | ||
return nil, fmt.Errorf("No at binaryAnnotations[%d]", i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what this error means, also is binaryAnnotations going to be clear to user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in b64e90c
plugins/inputs/zipkin/handler.go
Outdated
// ContentType returns a Decoder that is able to produce Traces from bytes. | ||
// Failure should yield an HTTP 415 (`http.StatusUnsupportedMediaType`) | ||
// If a Content-Type is not set, zipkin assumes application/json | ||
func ContentType(r *http.Request) (codec.Decoder, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider renaming this function, the current name does not indicate what the function does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 63d07e2
(cherry picked from commit 13a6b91)
Fix #3137
Required for all PRs:
This PR updates the zipkin plugin to accept JSON V1 zipkin span format: https://github.com/openzipkin/zipkin-api/blob/master/zipkin-api.yaml
Refactored the decoding and encoding of spans into
Trace
by creating acodec
package.Test coverage significantly increased.
This structure should allow supporting zipkin JSON v2 span format: openzipkin/zipkin#1499