by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:01
    CircleCI failed: spring-cloud build (#6262) in https://github.com/spring-cloud/spring-cloud-sleuth
  • 17:54

    marcingrzejszczak on reactor_improvements_yet_again

    WIP (compare)

  • 14:39
    marcingrzejszczak commented #1491
  • 14:37
    spring-issuemaster unlabeled #1491
  • 14:37
    spring-issuemaster labeled #1491
  • 14:37
    robotmrv commented #1491
  • 14:22
    spring-issuemaster labeled #1673
  • 14:22
    spring-issuemaster commented #1673
  • 14:09
    spencergibb labeled #1491
  • 14:09
    spencergibb unlabeled #1491
  • 14:09
    spencergibb commented #1491
  • 14:05
    spencergibb assigned #656
  • Jul 03 18:32
    Happy-Neko commented #1672
  • Jul 03 17:33
    CircleCI failed: spring-cloud build (#6261) in https://github.com/spring-cloud/spring-cloud-sleuth
  • Jul 03 17:28

    marcingrzejszczak on reactor_improvements_yet_again

    WIP (compare)

  • Jul 03 16:22
    spring-issuemaster labeled #1672
  • Jul 03 16:22
    Happy-Neko commented #1672
  • Jul 03 06:27
    spring-issuemaster labeled #1677
  • Jul 03 06:23
    kprasad99 opened #1677
  • Jul 01 07:43
    davidmelia commented #1627
Adrian Cole
@adriancole
the link you are pointing to is the version 3 docs
ah I see what you are saying
thanks. can you do a pull request to fix this?
Saisurya Kattamuri
@saisuryakat
Sure, I can
but I'm having trouble making baggage fields work
Is there any sample repo present for reference
image.png
I'm confused esp whether to just define the headers in application.yml and set the values in controller or to config brave(as shown in brave docs)
Adrian Cole
@adriancole
if you are doing what the properties can do, just use the properties
brave is used for other things even spring 2.5
sleuth has things built-in so easier to use properties than javaconfig for the same result
I'm changing example project for you hold a sec
Saisurya Kattamuri
@saisuryakat
Okay
Adrian Cole
@adriancole
Saisurya Kattamuri
@saisuryakat
Thanks
Adrian Cole
@adriancole
just tested so :thumbsup:
Saisurya Kattamuri
@saisuryakat
Adrian Cole
@adriancole
:bow:
Templeton Peck
@LtTempletonPeck
Are there any working examples of integrating a spring boot project with AWS X-Ray? A quick googling say no. Do I just import the deps (spring-cloud-starter-zipkin/io.zipkin.aws:zipkin-reporter-xray-udp) and override the ZipkinAutoConfiguration.REPORTER_BEAN_NAME with my own XRayUDPReporter bean? There doesn't seem to be any auto-config for the Zipkin X-Ray but I'm happy to be wrong.
Marcin Grzejszczak
@marcingrzejszczak
@devinsba don't you have such a sanple or am i mistaken?
Adrian Cole
@adriancole
@anuraaga fyi
@LtTempletonPeck so there's no auto-config I'm aware of (ex if so it would be in spring-cloud-aws and I think we'd have heard of it)
there's not much auto-config for xray anyway as the daemon is localhost, but if you wanted to have an auto-config I suspect an issue on spring-cloud-aws would make most sense as something similar to this exists in spring-cloud-gcp
1 reply
eyalringort
@eyalringort
Marcin Grzejszczak
@marcingrzejszczak
I've answered
Veera93
@Veera93
@adriancole Thanks for you reply. So using trace filter is the only way in which I can get the traceId in the response header then
Marcin Grzejszczak
@marcingrzejszczak
You can use a filter and retrieve tracing info before sending out the response
eyalringort
@eyalringort
@marcingrzejszczak I added a sample project for my SO question
Marcin Grzejszczak
@marcingrzejszczak
:+1: thanks
krraghavan
@krraghavan
My spring webflux based boot application seems to post traces to zipkin properly but neither the logs nor the controller methods are getting the trace and span ids. It’s a pretty basic configuration with sleuth starter and zipkin starter. The trace web filter is getting invoked correctly and recording the initial span. I realize this is pretty vague but am wondering if I’m missing something basic. What information should I provide here if this is not obvious.
Marcin Grzejszczak
@marcingrzejszczak
if you're using a Controller with WebFlux and you log out things with a logger then that should work
2 replies
Templeton Peck
@LtTempletonPeck

Hi I now have traces being sent to X-Ray but the names that display in the X-Ray console for traces are not being correctly set for Feign and Spring Cloud Stream Kafka. For Feign they are using the http method, here is an example the name is get but the annotations.http_path has the path:

                "subsegments": [
                    {
                        "id": "f945f28acb910a16",
                        "name": "get",
                        "start_time": 1591611761.254306,
                        "end_time": 1591611761.583249,
                        "http": {
                            "request": {
                                "method": "GET"
                            }
                        },
                        "annotations": {
                            "http_path": "/device/v1",
                            "operation": "get"
                        },
                        "namespace": "remote"
                    },
                    ...

For Spring Cloud Stream Kafka I was hoping it would resolve the destination of the channel but at the moment it is using the binder as the name and the channel is in the annotations. It doesnt seem to have resolved the destination.

                    {
                        "id": "aeab33b8a6b2c004",
                        "name": "kafka",
                        "start_time": 1591611763.963422,
                        "end_time": 1591611763.968351,
                        "annotations": {
                            "channel": "output"
                        },
                        "namespace": "remote"
                    }

Do you know if its possible to override the name? So far I've tried @SpanName and @PostMapping(name = "my-name" but neither work.

Adrian Cole
@adriancole
@LtTempletonPeck I think feign is using defaults. It could possibly be made to implement HttpRequest.route() as UriTemplate https://github.com/OpenFeign/feign/blob/835a96380e3212afb2c882aa54e463eea4c20b32/core/src/main/java/feign/template/UriTemplate.java#L28 you could open an issue for that. I haven't worked on feign for years but I initially envisioned MethodMetadata.configKey as the span name hystrix name etc also. But anyway HttpRequest.route() would work better as the template value than the path as it won't lead to unlimited span names. OTOH if x-ray is ok with unlimited span names, path could be used instead (possibly in the data conversion) cc @anuraaga
2 replies
I don't know the answer to the other question so will punt that one :D
Marcin Grzejszczak
@marcingrzejszczak
There's nothing OOB AFAIR that would allow to change Feign spans for the RPC calls. You'd have to use Brave configuration to try to change it
Anuraag Agrawal
@anuraaga
Don't know much about feign, but if using zipkin-aws, remote service names need to be set to have proper names in x-ray segments. Maybe it's not set? https://github.com/openzipkin/zipkin-aws/blob/master/storage-xray-udp/src/main/java/zipkin2/storage/xray_udp/UDPMessageEncoder.java#L75
2 replies
benrejebmoh
@benrejebmoh

Hello,
I m trying to propagate some extra-information within all log records (in my current service and client services) using spring-cloud-sleuth 2.2.1.RELEASE, but facing a problem when trying to add local-keys to SLF4J's MDC. (it works perfectly with propagation-keys for remote calls). This is my configuration:
spring:
sleuth:
propagation-keys:

  - remote-key
local-keys:
  - local-key
propagation:
  tag:
    whitelisted-keys:
      - remote-key
      - local-key
log:
  slf4j:
    whitelisted-mdc-keys:
      - remote-key
      - local-key

I'm i missing some thing? or log.slf4j.whitelisted-mdc-keys is not intended to work with local-keys?

Thank you in advance.

Marcin Grzejszczak
@marcingrzejszczak
can you try the latest release? @adriancole has done quite a few changes in baggage propagation in the meantime
Dimitrios Klimis
@dimi-nk
Hey everyone. I've been looking into sleuth and I was wondering if any client-side buffering is done before pushing traces to zipkin. The only relevant prop I found is spring.sleuth.sampler.rate but I assume it's more about rate limiting rather than buffering.
I guess this is a job for brave, but I cannot find any documentation 👀
Adrian Cole
@adriancole
@dimi-nk https://cloud.spring.io/spring-cloud-sleuth/reference/html/#sending-spans-to-zipkin says it is async, but doesn't copy the properties defined into asciidoc
to see properties you can look at the appendix here https://cloud.spring.io/spring-cloud-sleuth/reference/html/appendix.html
for example, the default amount of time to buffer spans is 1 second spring.zipkin.message-timeout
in the latest version of sleuth 2.2.3, this is what's ultimately controlled https://github.com/openzipkin/zipkin-reporter-java/tree/master/brave
and spring.zipkin.message-timeout -> https://github.com/openzipkin/zipkin-reporter-java#tuning
krraghavan
@krraghavan
Thanks @marcingrzejszczak. Turned out to be some problem with my configuration. I am using the async mongodb java driver to execute reactive queries on my Mongodb. I'm assuming these don't get instrumented by default. Should I be using annotations on the Repository interfaces to get these to be instrumented?
Marcin Grzejszczak
@marcingrzejszczak
Yes that's the way to go
Dimitrios Klimis
@dimi-nk

@dimi-nk https://cloud.spring.io/spring-cloud-sleuth/reference/html/#sending-spans-to-zipkin says it is async, but doesn't copy the properties defined into asciidoc

Thanks @adriancole , that clears is up

ricardoneves93
@ricardoneves93
Hello everyone!
I am using kafka streams alongside sleuth to enable tracing intra and inter service.
Right now, I am setting the setUncaughtExceptionHandler on StreamsBuilderFactoryBean class. This will allows to catch expected and unexpected exceptions that occur inside Streams Api.
So far so good, when an exception is thrown, the callback method that is received by setUncaughtExceptionHandler setter is called as expected.
However I am trying to produce logs inside callback method and traceId is not preserved. For example when I call inside the callback method tracer.currentSpan() it returns null.
Dos this happens because callback method is running on a separate thread? If yes, what is the best way to pass the Tracer context to a new thread?
9 replies
Marcin Grzejszczak
@marcingrzejszczak
it might be the case. You'd need to instrument whatever is spawning that thread