opentelemetry-java/examples
Anuraag Agrawal 905c1ffa4f
Update Gradle and build dependencies. (#4026)
2021-12-23 07:56:05 -08:00
..
autoconfigure remove a todo from an example (#3797) 2021-10-27 09:21:13 -07:00
gradle/wrapper Update Gradle and build dependencies. (#4026) 2021-12-23 07:56:05 -08:00
grpc Update READMEs to be more helpful (#3007) 2021-03-10 19:51:28 -08:00
http Remove credential info from url in example (#3121) 2021-04-16 08:03:29 -07:00
jaeger Update READMEs to be more helpful (#3007) 2021-03-10 19:51:28 -08:00
logging Update the examples to v1.9.0 (#3879) 2021-11-15 10:55:33 -08:00
metrics Example updates for 1.5.0 (#3487) 2021-08-14 10:37:19 +09:00
otlp Add port mapping to example docker-compose.yaml (#4021) 2021-12-22 11:53:54 +09:00
prometheus Update the examples for the 1.7.0 release (#3719) 2021-10-11 11:23:59 +09:00
sdk-usage update the example code for the 0.17.0 release. (#2886) 2021-02-18 15:01:44 -08:00
zipkin Update readme and examples for 1.0.0 (#2949) 2021-02-26 14:18:16 -08:00
README.md Update READMEs to be more helpful (#3007) 2021-03-10 19:51:28 -08:00
build.gradle Update the docs and the examples for v1.9.1 (#3934) 2021-11-25 10:20:14 +09:00
gradle.properties Update the otlp examples for the latest collector build (#3701) 2021-10-07 12:39:40 +09:00
gradlew Upgrade Gradle of examples to 7.2., fix println using non-existent property (#3600) 2021-09-10 07:52:51 -07:00
gradlew.bat Upgrade Gradle of examples to 7.2., fix println using non-existent property (#3600) 2021-09-10 07:52:51 -07:00
settings.gradle Update the otlp examples for the latest collector build (#3701) 2021-10-07 12:39:40 +09:00

README.md

Java OpenTelemetry Examples

This module contains a set of fully-functional, working examples of using the OpenTelemetry Java APIs and SDK that should all be able to be run locally. Some of them assume you have docker running on your local machine.

Example modules:

  • Using the SDK AutoConfiguration module
    • This module contains a fully-functional example of using the autoconfigure SDK extension module to configure the SDK using only environment variables (or system properties).
    • Note: the opentelemetry-sdk-extension-autoconfigure module is still experimental at this time.
  • Setting up OTLP exporters
    • OTLP is the OpenTelemetry Protocol. This module will demonstrate how to configure the OTLP exporters, and send data to the OpenTelemetry collector using them.
    • Note: this example requires having docker installed to run the example.
  • Configuring the Jaeger Exporter
    • This module contains a fully-functional example of configuring the OpenTelemetry SDK to use a Jaeger exporter, and send some spans to it using the OpenTelemetry API.
    • Note: this example requires having docker installed to run the example.
  • Setting up the Zipkin exporter
    • This module contains a fully-functional example of configuring the OpenTelemetry SDK to use a Jaeger exporter, and send some spans to a zipkin backend using the OpenTelemetry API.
    • Note: this example requires having docker installed to run the example.
  • Configuring the Logging Exporters
    • This module contains a fully-functional example of configuring the OpenTelemetry SDK to use a logging exporter.
  • Manually Configuring the SDK
    • This module shows some concrete examples of manually configuring the Java OpenTelemetry SDK for Tracing.
  • Using the OpenTelemetry metrics API
    • This module contains examples of using the (still experimental) OpenTelemetry metrics APIs.
  • Setting up the Prometheus exporter
    • The module shows how to configure the OpenTelemetry SDK to expose an endpoint that can be scraped by Prometheus.
    • Note: this example uses experimental metrics APIs and SDK.
  • Manual instrumentation of GRPC
    • This module provides an example of writing manual instrumentation for GRPC, both client and server.
    • Note that if you want to use more production-ready instrumentation for GRPC, this is provided as a part of the OpenTelemetry Java Instrumentation project.