{"id":15177393,"url":"https://github.com/open-telemetry/opentelemetry-java-examples","last_synced_at":"2025-04-08T09:11:28.204Z","repository":{"id":37074699,"uuid":"427247481","full_name":"open-telemetry/opentelemetry-java-examples","owner":"open-telemetry","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-31T22:15:55.000Z","size":1942,"stargazers_count":265,"open_issues_count":10,"forks_count":138,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-04-01T08:44:10.260Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opentelemetry.io","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/open-telemetry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-12T05:50:26.000Z","updated_at":"2025-03-31T08:11:39.000Z","dependencies_parsed_at":"2023-02-19T05:45:37.579Z","dependency_job_id":"941720c5-90be-4deb-8f7b-94d0325778ba","html_url":"https://github.com/open-telemetry/opentelemetry-java-examples","commit_stats":null,"previous_names":["open-telemetry/opentelemetry-java-examples","open-telemetry/opentelemetry-java-docs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-telemetry%2Fopentelemetry-java-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-telemetry%2Fopentelemetry-java-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-telemetry%2Fopentelemetry-java-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-telemetry%2Fopentelemetry-java-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-telemetry","download_url":"https://codeload.github.com/open-telemetry/opentelemetry-java-examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247809964,"owners_count":20999816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-27T14:21:58.254Z","updated_at":"2025-04-08T09:11:28.175Z","avatar_url":"https://github.com/open-telemetry.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java OpenTelemetry Examples\n\nThis module contains a set of fully-functional, working examples of using the\nOpenTelemetry Java APIs and SDK that should all be able to be run locally. Some\nof them assume you have docker running on your local machine.\n\n## Example modules:\n\n- [Using the SDK AutoConfiguration module](autoconfigure)\n    - This module contains a fully-functional example of using the autoconfigure\n      SDK extension module to configure the SDK using only environment\n      variables (or system properties).\n    - Note: the `opentelemetry-sdk-extension-autoconfigure` module is still\n      experimental at this time.\n- [Manual instrumentation of HTTP](http)\n    - This module provides an example of writing manual instrumentation for\n      HTTP, both client and server.\n    - Note more production-ready instrumentation for HTTP is provided as a part\n      of the [OpenTelemetry Java Instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation)\n      project.\n- [Manual span creation and baggage propagation](manual-tracing)\n    - This module provides an example of manually creating spans using the\n      OpenTelemetry API with the ExtendedTracer.\n    - Additionally, it demonstrates how to use the OpenTelemetry API to\n      propagate baggage items.\n- [Configuring the Jaeger Exporter](jaeger)\n    - This module contains a fully-functional example of configuring the\n      OpenTelemetry SDK to use a Jaeger exporter, and send some spans to it\n      using the OpenTelemetry API.\n    - Note: this example requires having docker installed to run the example.\n- [Using the OpenTelemetry Java Agent](javaagent)\n    - This module demonstrates using the OpenTelemetry Java Agent with a simple\n      spring boot application. Traces, metrics, and logs are exported to a\n      collector via OTLP.\n- [Spring native image telemetry with OpenTelemetry Spring Starter](spring-native)\n    - This module demonstrates using the OpenTelemetry Spring Boot starter with a\n      Graal VM native image. Traces and metrics are exported to a collector via OTLP.\n- [Configuring Log Appenders](log-appender)\n    - This module demonstrates how to configure the Log4j and Logback appenders to\n      bridge logs into the OpenTelemetry Log SDK.\n- [Configuring the Logging Exporters](logging)\n    - This module contains a fully-functional example of configuring the\n      OpenTelemetry SDK to use a logging exporter.\n- [Exporting Application logs using JSON logging in Kubernetes](logging-k8s-stdout-otlp-json)\n    - This module demonstrates how to export application logs using JSON logging\n      in Kubernetes.\n- [Using the OpenTelemetry metrics API](metrics)\n    - This module contains examples of using the OpenTelemetry metrics APIs.\n- [Using OpenTelemetry Micrometer shim](micrometer-shim)\n    - This module contains an example of a typical micrometer setup (spring boot\n      with spring boot actuator) configured to bridge metrics to OpenTelemetry\n      with the micrometer shim.\n    - Note: the micrometer shim is still experimental at this time.\n- [Setting up OTLP exporters](otlp)\n    - OTLP is the OpenTelemetry Protocol. This module will demonstrate how to\n      configure the OTLP exporters, and send data to the OpenTelemetry collector\n      using them.\n    - Note: this example requires having docker installed to run the example.\n- [Setting up the Prometheus exporter](prometheus)\n    - The module shows how to configure the OpenTelemetry SDK to expose an\n      endpoint that can be scraped by Prometheus.\n    - Note: the prometheus metric reader is still experimental at this time.\n- [Manually Configuring the SDK](sdk-usage)\n    - This module shows some concrete examples of manually configuring the Java\n      OpenTelemetry SDK for Tracing.\n- [Telemetry Testing](telemetry-testing)\n    - This module demonstrates how to test OpenTelemetry instrumentation with a\n      MockServer.\n- [Setting up the Zipkin exporter](zipkin)\n    - This module contains a fully-functional example of configuring the\n      OpenTelemetry SDK to use a Zipkin exporter, and send some spans to a\n      zipkin backend using the OpenTelemetry API.\n    - Note: this example requires having docker installed to run the example.\n\n## Approvers and Maintainers\n\nSuperset of approvers and maintainers from the\n[opentelemetry-java](https://github.com/open-telemetry/opentelemetry-java#contributing),\n[opentelemetry-java-instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation#contributing),\nand\n[opentelemetry-java-contrib](https://github.com/open-telemetry/opentelemetry-java-contrib#contributing)\nrepositories.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-telemetry%2Fopentelemetry-java-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-telemetry%2Fopentelemetry-java-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-telemetry%2Fopentelemetry-java-examples/lists"}