-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Traces from micronaut app are not visible in Jaeger #2209
Comments
There were some issues that were resolved with Jaeger in Micronaut 1.2.3 Please could you upgrade to the latest version and verify again? |
I upgraded to 1.2.3, but did not help. |
Please provide an example that reproduces the issue |
I think the explanation is clear, in order to configure tracing, we need to set jaeger endpoint and port like this:
If I bring up a localhost all-in-one jaeger using docker and replace the jaeger endpoint with localhost and the port to 14268, traces are visible in jaeger, but if I want to use another jaeger server than localhost, it does not show any traces. My jaeger server is up and running, since other non-micronaut services are sending their traces to jaeger. I guess the configuration of the tracing in micronaut is so that it could only support localhost. |
As a workaround you can define the following bean: import io.jaegertracing.Configuration;
import io.jaegertracing.Configuration.SenderConfiguration;
@Factory
class MySenderConfig {
@Singleton
SenderConfiguration senderConfig() {
SenderConfiguration config = SenderConfiguration.fromEnv();
config.withAgentHost("**jaeger endpoint**");
config.withAgentPort(14268);
return config;
}
} |
Thank you for the workaround, but it could not resolve my issue. |
@ZeinabAshjaei I have the same issue with you |
Apologies, this should work until 1.2.4 is out: import javax.inject.Singleton;
import io.jaegertracing.Configuration.ReporterConfiguration;
import io.jaegertracing.Configuration.SenderConfiguration;
import io.micronaut.context.event.BeanCreatedEvent;
import io.micronaut.context.event.BeanCreatedEventListener;
import io.micronaut.tracing.jaeger.JaegerConfiguration;
@Singleton
class CustomJaegerConfiguration implements BeanCreatedEventListener<JaegerConfiguration> {
@Override
public JaegerConfiguration onCreated(BeanCreatedEvent<JaegerConfiguration> event) {
JaegerConfiguration config = event.getBean();
ReporterConfiguration reporterConfig = ReporterConfiguration.fromEnv();
SenderConfiguration senderConfig = SenderConfiguration.fromEnv();
senderConfig.withAgentHost("**jaeger endpoint**");
senderConfig.withAgentPort(14268);
reporterConfig.withSender(
senderConfig
);
config.setReporterConfiguration(reporterConfig);
return config;
}
} |
Am not sure why but using |
I have an instrumented micronaut application. If I configure localhost jaeger to see the traces, it would be fine, but the same configuration for a customized jaeger endpoint is not working. It seems that micronaut configuration for tracing supports only localhost.
Bring up a customized jaeger, not localhost and set its endpoint and port in the application.yaml file, like the way it has been explained in the documentation.
https://guides.micronaut.io/micronaut-microservices-distributed-tracing-jaeger/guide/index.html
Expected Behaviour
To see spans in jaeger UI.
Actual Behaviour
The application is not in the list of services.
Environment Information
The same issue is reported in stackoverflow:
https://stackoverflow.com/questions/58249869/micronaut-and-opentracing-of-method-calls
The text was updated successfully, but these errors were encountered: