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

telegraf zipkin plugin "Error in plugin [inputs.zipkin]: Unknown data type 97" #3137

Closed
entrix-yscho opened this issue Aug 18, 2017 · 7 comments
Assignees
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@entrix-yscho
Copy link

entrix-yscho commented Aug 18, 2017

Bug report

When I try telegraf zipkin plugin with example of "spring-cloud-sleuth-sample-zipkin",
I got error message "Error in plugin [inputs.zipkin]: Unknown data type 97"

But, when I use example "brave-tracer-example", working good.

both of above examples are work properly on zipkin server.

Relevant telegraf.conf:

./telegraf --input-filter zipkin --output-filter influxdb config > telegraf.conf

System info:

[Include Telegraf version, operating system name, and other relevant details]
Telegraf v1.5.0~pre3006ccbf (git: master 3006ccb)
OS : OSX

Steps to reproduce:

  1. ...
  2. ...

Expected behavior:

Actual behavior:

Additional info:

[Include gist of relevant config, logs, etc.]

@danielnelson
Copy link
Contributor

Just to make sure, is this the source of the sample? https://github.com/spring-cloud/spring-cloud-sleuth/tree/master/spring-cloud-sleuth-samples

@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Aug 18, 2017
@entrix-yscho
Copy link
Author

I was using
"https://github.com/spring-cloud/spring-cloud-sleuth/tree/master/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin"

and I also tried following example , but got same error message..

created spring starter with web, zipkin client on eclipse

package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@SpringBootApplication
public class Demo2Application {
	
	@Bean
	RestTemplate restTemplate(){
		return new RestTemplate();
	}
	
	@GetMapping("/hi")
	String hi() {
		return restTemplate().getForEntity("http://localhost:8010/hi2", String.class).getBody();
	}
	
	@GetMapping("/hi2")
	String hi2() {
		return "hihi";
	}

	public static void main(String[] args) {
		SpringApplication.run(Demo2Application.class, args);
	}
}

@entrix-yscho
Copy link
Author

entrix-yscho commented Aug 18, 2017

@danielnelson
I attached zipkin message which got error.. Thanks

[ { "traceId": "7312f822d43d0fd8", "id": "b26412d1ac16767d", "name": "http:/hi2", "parentId": "7312f822d43d0fd8", "annotations": [ { "timestamp": 1503031538791000, "value": "sr", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } }, { "timestamp": 1503031538794000, "value": "ss", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } } ], "binaryAnnotations": [ { "key": "mvc.controller.class", "value": "Demo2Application", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } }, { "key": "mvc.controller.method", "value": "hi2", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } }, { "key": "spring.instance_id", "value": "192.168.0.8:test:8010", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } } ] }, { "traceId": "7312f822d43d0fd8", "id": "b26412d1ac16767d", "name": "http:/hi2", "parentId": "7312f822d43d0fd8", "timestamp": 1503031538786000, "duration": 10000, "annotations": [ { "timestamp": 1503031538786000, "value": "cs", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } }, { "timestamp": 1503031538796000, "value": "cr", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } } ], "binaryAnnotations": [ { "key": "http.host", "value": "localhost", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } }, { "key": "http.method", "value": "GET", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } }, { "key": "http.path", "value": "/hi2", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } }, { "key": "http.url", "value": "http://localhost:8010/hi2", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } }, { "key": "spring.instance_id", "value": "192.168.0.8:test:8010", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } } ] }, { "traceId": "7312f822d43d0fd8", "id": "7312f822d43d0fd8", "name": "http:/hi", "timestamp": 1503031538778000, "duration": 23393, "annotations": [ { "timestamp": 1503031538778000, "value": "sr", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } }, { "timestamp": 1503031538801000, "value": "ss", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } } ], "binaryAnnotations": [ { "key": "mvc.controller.class", "value": "Demo2Application", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } }, { "key": "mvc.controller.method", "value": "hi", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } }, { "key": "spring.instance_id", "value": "192.168.0.8:test:8010", "endpoint": { "serviceName": "test", "ipv4": "192.168.0.8", "port": 8010 } } ] } ]

@danielnelson
Copy link
Contributor

Thank @entrix-yscho , this should make it much easier for me to reproduce.

@goller
Copy link
Contributor

goller commented Aug 18, 2017

Hi @entrix-yscho, thank you for writing in. I'm pretty sure the problem is that by default that zipkin client will send with JSON encoding while telegraf, currently, only accepts thrift.

I'm seeing the default JSON encoding here: https://github.com/spring-cloud/spring-cloud-sleuth/blob/cbbb3c2a40c65a113a021a979e5a908323267b7e/spring-cloud-sleuth-zipkin/src/main/java/org/springframework/cloud/sleuth/zipkin/HttpZipkinSpanReporter.java#L32

I'm not sure, yet, how to change the encoding in the client, but, I'll work on getting telegraf to accept the JSON format as well.

@danielnelson danielnelson added this to the 1.4.0 milestone Aug 22, 2017
@danielnelson
Copy link
Contributor

@entrix-yscho This bug should be fixed now, it would be really helpful if you could try it again and let us know how it goes.

@entrix-yscho
Copy link
Author

@danielnelson
I Appreciate your fast processing!!
It works fine !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants