Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 08:14
    spring-issuemaster labeled #1789
  • 08:12
    SimSonic opened #1789
  • Nov 26 13:43
    CircleCI success: spring-cloud build (#6517) in https://github.com/spring-cloud/spring-cloud-sleuth
    • Bumped Brave to 5.13.2; fixes gh-1788
      (16bf4d6d10c97e54bbf53e62bdb7632ea01ca084 by Marcin Grzejszczak)
  • Nov 26 13:28
    marcingrzejszczak closed #1788
  • Nov 26 13:28

    marcingrzejszczak on master

    Bumped Brave to 5.13.2; fixes g… (compare)

  • Nov 26 13:09
    CircleCI failed: spring-cloud build (#6516) in https://github.com/spring-cloud/spring-cloud-sleuth
    • Bumped otel to 0.11; fixes gh-1787
      (9befcd333d645055b677533cafe567f0819d63e1 by Marcin Grzejszczak)
  • Nov 26 12:57
    mrksph commented #1775
  • Nov 26 12:57
    mrksph commented #1775
  • Nov 26 12:55
    mrksph commented #1775
  • Nov 26 12:54
    mrksph commented #1775
  • Nov 26 12:54
    mrksph commented #1775
  • Nov 26 12:54
    mrksph commented #1775
  • Nov 26 12:54
    mrksph commented #1775
  • Nov 26 12:54
    mrksph commented #1775
  • Nov 26 12:53
    mrksph commented #1775
  • Nov 26 12:53

    marcingrzejszczak on otel_0_11_0

    Bumped OTel to 0.11.0; fixes gh… Bumped otel to 0.11; fixes gh-1… (compare)

  • Nov 26 12:44
    marcingrzejszczak commented #1775
  • Nov 26 12:21
    adriancole removed as member
  • Nov 26 12:09
    mrksph commented #1775
  • Nov 26 11:56
    marcingrzejszczak labeled #1788
Marcin Grzejszczak
@marcingrzejszczak
if you add a Always sampler bean that works fine
so your request is unsampled
now let me check a couple of more things - give ma sec
yeah, since you have no Zipkin nor do you have a span handler, nor a tracing customizer Brave will assume that you don't need sampling
we might add this to the docs
so people don't get confused - thanks for catching that!
Fizii Q
@qfizii_gitlab
ah interesting. thanks
Marcin Grzejszczak
@marcingrzejszczak
do you want to file a PR to the docs (master branch would be enough I guess)

btw add


        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-sleuth-zipkin</artifactId>
        </dependency>

and it works fine

Fizii Q
@qfizii_gitlab
parser is now called but the added header is not seen by the client.
I suspect it's because spring message converter has already committed the response by the time servlet filter is called?
Marcin Grzejszczak
@marcingrzejszczak
interesting... let me check (BTW really thanks for checking all of this out - there's a lot of changes for Sleuth 3.0.0. BTW this is not a new feature but I've finally documented it properly)
Fizii Q
@qfizii_gitlab

If I choose W3C propagation type, each extra bagge field is sent twice. once in "baggage" header and once on its own.

baggage: country-code1=A,country-code2=B
country-code1: A
country-code2: B

is there a way to customize what sent in baggage header and what's sent on its own?

Marcin Grzejszczak
@marcingrzejszczak
yeah so what you can do is set spring.sleuth.otel.propagation.sleuth-baggage.enabled=false that way you'll have only the w3c ones
you're using OTel or Brave?
aman0008
@aman0008
Hi, i have 2 microservices. One is with spring boot and other is with dropwizard framework. I have successfully integrated sleuth with the spring boot service (It is edge service). But unable to get the tracing id and span id in my dropwizard service. Need help how to solve this issue.
Marcin Grzejszczak
@marcingrzejszczak
you have provided no meaningful information to help you out
no sleuth version info, no boot version, you didn't telll us what you did
nothing
aman0008
@aman0008

@marcingrzejszczak : Here are the details:

Application A (Spring boot Application (2.2.5.RELASE), JAVA 11)

pom.xml:

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>

I can see the tracing id and span id in my logs.

Application A makes and http call to Application B

Application B (Dropwizard framework, JAVA 8)

pom.xml:

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>

Unable to see the tracing id and span id in the logs

Let me know if more information is required.

Marcin Grzejszczak
@marcingrzejszczak
Yeah, application B doesn't use Spring so it won't work
Fizii Q
@qfizii_gitlab

spring.sleuth.otel.propagation.sleuth-baggage.enabled=false that way you'll have only the w3c ones

I am using brave. I tried setting these two props without success:

spring.sleuth.brave.propagation.sleuth-baggage.enabled=false
spring.sleuth.zipkin.propagation.sleuth-baggage.enabled=false
Marcin Grzejszczak
@marcingrzejszczak
Hmm I'll need a sample 😬
Anders Clausen
@AndersClausen
Hi @marcingrzejszczak . I was just reading this issue spring-cloud/spring-cloud-sleuth#707 and was wondering if it's completely dead in the water? Is there no way for me to send Sleuth tracing to Datadog (as far as you're aware)? We currently can't include the DD agent into our docker image because we're using spring boot maven plugin to create it (wish the builder from the Paketo buildpack would have a setting for it).
Marcin Grzejszczak
@marcingrzejszczak
Hi. There are ways to do it. you could register your own span handler bean that would take a mutablespan and upload it to dd (of course you'd have to take care of queueing those spans and sending them in batches I guess). What's the dd expected format?
With 3.0.0-m5 you can use opentelemetry with sleuth and dd understands that (https://github.com/flachnetz/dd-zipkin-proxy)
Marcin Grzejszczak
@marcingrzejszczak
wrong link
so regarding the 2 projects I mentioned - they would allow you to translate zipkin spans to datadog
Anders Clausen
@AndersClausen
Thanks for your very thorough answer @marcingrzejszczak - it's much appreciated
Fizii Q
@qfizii_gitlab
Fizii Q
@qfizii_gitlab
that's with brave.
trying with otel, it does work
Fizii Q
@qfizii_gitlab
with otel, setting or not setting spring.sleuth.baggage.remote-fieldshas no effect. baggage fields are always propagated:
spring.sleuth.baggage.remote-fields=my-header,my-header2 
baggage: my-header3=new-value3,my-header2=new-value2;propagation=unlimited,my-header=new-value;propagation=unlimited

#spring.sleuth.baggage.remote-fields=my-header,my-header2 
baggage: my-header=new-value,my-header3=new-value3,my-header2=new-value2
Marcin Grzejszczak
@marcingrzejszczak

@qfizii_gitlab can you file 1 issue please with not being able to disable baggage propagation for brave?

As for the second one the spring.sleuth.baggage.remote-fields will be applicable only for the Sleuth based way of propagating baggage - that means where baggage name, value = header key,value

Fizii Q
@qfizii_gitlab
where is propagation=unlimited coming from? it's not in W3C spec?
Marcin Grzejszczak
@marcingrzejszczak
no - it's a magic string :shrug:
I had a discussion about this with the OTel folks
you can pass arbitrary stuff there
initially in the otel implementation they passed propagation=unlimited from an enum, then they converted it to a string and then they said that it was just an example of how you could pass baggage metadata
so in general it's coming from Sleuth
Anders Clausen
@AndersClausen

@qfizii_gitlab thanks for the example above but I haven't had much luck so far. First of all, I couldn't get neither of the two open source projects to work and I'm unable to get the OpenTelemetry to work as well.
If I have a spring boot service with a REST endpoint (RouterFunction style) that makes a call out to Elasticsearch and then returns a response, that should generate me some tracing out-of-the-box right? As per the documentation, I have added the following two dependencies to my POM file:

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-sleuth</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-sleuth-otel</artifactId>
        </dependency>

However, I'm still getting this error:

{
  "instant": {
    "epochSecond": 1606056361,
    "nanoOfSecond": 931753800
  },
  "thread": "main",
  "level": "ERROR",
  "loggerName": "org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter",
  "message": "\r\n\r\n***************************\r\nAPPLICATION FAILED TO START\r\n***************************\r\n\r\nDescription:\r\n\r\nParameter 1 of method baggageTextMapPropagator in org.springframework.cloud.sleuth.otel.propagation.TraceOtelPropagationAutoConfiguration$BaggagePropagatorConfiguration required a single bean, but 2 were found:\r\n\t- braveTracer: defined by method 'braveTracer' in class path resource [org/springframework/cloud/sleuth/brave/bridge/TraceBraveBridgeAutoConfiguation.class]\r\n\t- otelTracerBridge: defined by method 'otelTracerBridge' in class path resource [org/springframework/cloud/sleuth/otel/bridge/TraceOtelBridgeAutoConfiguation.class]\r\n\r\n\r\nAction:\r\n\r\nConsider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed\r\n",
  "endOfBatch": false,
  "loggerFqcn": "org.apache.commons.logging.LogAdapter$Log4jLog",
  "threadId": 1,
  "threadPriority": 5
}

I've also got this property turned on for W3C

spring:
  sleuth:
    http:
      enabled: true
    web:
      enabled: true
      webclient:
        enabled: true
    reactor:
      enabled: true
    propagation:
      type: w3c

Do you know what I'm doing wrong or maybe @marcingrzejszczak can tell me? How do I disable brave now that I'm using otel? I know it's still in milestone state but are there any samples I can have a look at?
I'm using spring boot 2.4.0 and spring cloud 2020.0.0-SNAPSHOT
Lots of questions, I know :-( Thanks for your help

Marcin Grzejszczak
@marcingrzejszczak
This is wrong. You use either starter sleuth or starter otrl
Marcin Grzejszczak
@marcingrzejszczak
You'd don't need to explicitly set those to true since they are set to true out of the box
Anders Clausen
@AndersClausen
OK thanks @marcingrzejszczak but I did try and remove the starter sleuth but then it didn't recognise the spring.sleuth.propagation.type property. Having said that, I might have had a dodgy .M2 directory so I'll try again. Thanks for replying though
Anders Clausen
@AndersClausen
With regards to above statement - it turned out to be a false/positive with IntelliJ
Anders Clausen
@AndersClausen
I'm connecting fine to Datadog after deployment, however I still don't see any tracing data in APM. I guess it's because io.opentelemetry doesn't have an exporter for Datadog. Do you think that's the correct conclusion @marcingrzejszczak ? I know you pointed me to the Datadog blog post the other day - the one that describes them embracing OpenTelemetry but I'm not sure they have actually worked on that since
Marcin Grzejszczak
@marcingrzejszczak
yes that's the reason