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

OpenTelemetry example #2

Merged
merged 3 commits into from
May 20, 2024

Conversation

marychatte
Copy link
Contributor

First commit is just copy of project kotlin-conf-testing

Second commit adds dependencies for OpenTelemetry and a task to run JaegerUI in a docker container. JaegerUI is used to visualise OpenTelemetry data

Third commit provides an example of usage KtorServerTracing plugin. It creates an instance of OpenTelemetry using AutoConfiguredOpenTelemetrySdk. Also, it adds an example of usage KtorServerTracing plugin and creates an extra parameter user_id to observe in traces

Notes:

  • To run the example, you need to run task runWithDocker
  • Docker container is restarting every run. It can be disabled here if needed
  • After running, OpenTelemetry traces can be viewed at http://localhost:16686/
    An example uses some extractions for the KtorServerTracing plugin. They will be added to the plugin in the next opentelemetry-java-instrumentation release. A full list of extractions can be found here

@marychatte marychatte changed the title Opentelemetry example OpenTelemetry example May 20, 2024
@garthgilmourni garthgilmourni merged commit 11e6914 into garthgilmourni:main May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants