svg
svg

Reputation: 286

Zipkin doesn't accept request(400 Bad Request)

I am trying to connect my application to zipkin. I have them both set up in a containers in docker. They are in the same network and they have connection to each other(I used docker compose to set them up). Currently the zipkin container returns as a response 200 OK on health checks but when i try to log a span with it like this:

docker run --rm -it --network backend appropriate/curl sh -c "curl -v -X POST http://zipkin:9411/api/v2/spans -H 'Content-Type: application/json' -d '[{\"id\":\"352bff9a74ca9ad2\",\"traceId\":\"5af7183fb1d4cf5f\",\"parentId\":\"6b221d5bc9e6496c\",\"name\":\"get /api\",\"timestamp\":1556604172355737,\"duration\":1431,\"kind\":\"SERVER\",\"localEndpoint\":{\"serviceName\":\"backend\",\"ipv4\":\"192.168.99.1\",\"port\":3306},\"remoteEndpoint\":{\"ipv4\":\"172.19.0.2\",\"port\":58648},\"tags\":{\"http.method\":\"GET\",\"http.path\":\"/api\"}}]'"

i get this as reponse:

*   Trying 172.18.0.11...
* TCP_NODELAY set
* Connected to zipkin (172.18.0.11) port 9411 (#0)
> POST /api/v2/spans HTTP/1.1
> Host: zipkin:9411
> User-Agent: curl/7.59.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 342
>
* upload completely sent off: 342 out of 342 bytes
< HTTP/1.1 400 Bad Request
< content-type: text/*
< content-length: 38
< server: Armeria/1.29.4
< date: Thu, 8 Aug 2024 12:42:50 GMT
<
* Connection #0 to host zipkin left intact
Malformed reading List<Span> from json

Why is it behaving like that????? also this is a log from the zipkin container:

2024-08-08 13:10:28 2024-08-08T11:10:28.925Z  WARN [/] 1 --- [           main] i.m.p.PrometheusMeterRegistry            : A MeterFilter is being configured after a Meter has been registered to this registry. All MeterFilters should be configured before any Meters are registered. If that is not possible or you have a use case where it should be allowed, let the Micrometer maintainers know at https://github.com/micrometer-metrics/micrometer/issues/4920. Enable DEBUG level logging on this logger to see a stack trace of the call configuring this MeterFilter.

Upvotes: 2

Views: 113

Answers (0)

Related Questions