Skip to content

Not able to report span to Zipkin server from node.js application with /api/v1/spans #10

Open
@debmalya

Description

@debmalya

Tried in following two ways, did not work. I am not sure whether there is any error on the way I called it. Still now not able to send span to Zipkin server.

var Zipkin = require('zipkin-simple')
var traceData
  1. with http-simple transport in following way
 var zipkinTracerSimple = new Zipkin({
  debug: true,
  host: "localhost",
  port: "9411",
  path: "/api/v1/spans",
  sampling: 1.0,
  transport: "http-simple"
}) 

 traceData = zipkinTracerSimple.sendServerSend(traceData, {
	'service': 'assign_guest_name'
  }) 

Result:

http-simple.js : http://localhost:9411/api/v1/spans

Server returned an error: 400
<Buffer 43 61 6e 6e 6f 74 20 64 65 63 6f 64 65 20 73 70 61 6e 73>

if converted to string it becomes 'Cannot decode spans'.

  1. with http transport
var zipkinTracerSimple = new Zipkin({
  debug: true,
  host: "localhost",
  port: "9411",
  path: "/api/v1/spans",
  sampling: 1.0,
  transport: "http"
}) 

traceData = zipkinTracerSimple.sendServerSend(traceData, {
	'service': 'assign_guest_name'
 }) 

Result:
http-batch.js : http://localhost:9411/api/v1/spans
Server returned an error: 400
<Buffer 43 61 6e 6e 6f 74 20 64 65 63 6f 64 65 20 73 70 61 6e 73>

Zipkin version I am tried with is zipkin-server-2.5.1-SNAPSHOT-exec.jar

Spans are reported to Zipkin when I changed the parth from ""/api/v1/spans" to ""/api/v2/spans" .
zipkin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions