Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Monium
  • Getting started
  • Overview
    • Overview
    • OTLP in Monium
    • Creating and setting up a project
      • OTel Collector setup
      • OpenTelemetry SDK
      • Java demo application example without an agent
      • Java demo application example with an agent
      • Example of monitoring a microservice suite in Kubernetes
      • Data delivery troubleshooting
  • Access management
  • Pricing policy
  • Terraform reference
  • Release notes

In this article:

  • Getting started
  • Setting up a demo app and telemetry delivery
  • Viewing telemetry in Monium
  1. Data delivery
  2. Otel Collector
  3. Java demo application example without an agent

Setting up a demo Java app and collecting telemetry

Written by
Yandex Cloud
Updated at March 24, 2026
  • Getting started
  • Setting up a demo app and telemetry delivery
  • Viewing telemetry in Monium

Getting startedGetting started

Sign up for Yandex Cloud and create a billing account:

  1. Navigate to the management console and log in to Yandex Cloud or create a new account.
  2. On the Yandex Cloud Billing page, make sure you have a billing account linked and it has the ACTIVE or TRIAL_ACTIVE status. If you do not have a billing account, create one and link a cloud to it.

If you have an active billing account, you can create or select a folder for your infrastructure on the cloud page.

Learn more about clouds and folders here.

Setting up a demo app and telemetry deliverySetting up a demo app and telemetry delivery

In this example, you will run Spring PetClinic and set up sending telemetry data to Monium.
You will be able to collect logs, traces, and metrics for JVM (class loading, CPU utilization, garbage collection), database connection pools, and HTTP endpoints without modifying your application code.

Your infrastructure
  1. Install Git and Java suitable for your OS. Here is an example:

    sudo apt update
    sudo apt install -y git openjdk-25-jdk
    
  2. Set the environment variables for the Monium connection:

    export MONIUM_API_KEY=<API_key>
    export MONIUM_PROJECT=<project_ID>
    export MONIUM_CLUSTER=<cluster_name> # optional
    
  3. Clone and build Spring PetClinic:

    git clone https://github.com/spring-projects/spring-petclinic
    cd spring-petclinic
    ./mvnw -DskipTests package
    
  4. Download the OpenTelemetry Java agent:

    curl -L -o opentelemetry-javaagent.jar \
    https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
    
  5. Configure telemetry export settings:

    export OTEL_EXPORTER_OTLP_PROTOCOL="grpc"
    export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.monium.yandex.cloud:443"
    export OTEL_EXPORTER_OTLP_HEADERS="x-monium-project=${MONIUM_PROJECT},x-monium-cluster=${MONIUM_CLUSTER},authorization=Api-Key ${MONIUM_API_KEY}"
    export OTEL_SERVICE_NAME=spring-petclinic
    
  6. Optionally, enable delta temporality for metrics:

    export OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE="delta"
    
  7. Run the application with the Java agent:

    java -javaagent:./opentelemetry-javaagent.jar -jar target/*.jar
    
  8. Open Spring PetClinic at http://localhost:8080 and simulate user actions. Metrics are created the first time the relevant functions are called.

Viewing telemetry in MoniumViewing telemetry in Monium

Monium UI
  1. On the Monium home page, select Shards on the left.

  2. In the list, select the shard with your service name.

    The shard name follows the <project_name>_<cluster_name>_<service_name> format, e.g., folder__b1g86q4m5vej********_default_spring-petclinic.

  3. To view a specific data type, on the left, select:

    • Metrics.

      In the query string, select project, cluster, and service one by one and click Execute query.

      Example of a chart with metrics

      image

      Learn more about using metrics.

    • Logs.

      In the query string, select project, cluster, and service one by one and click Execute query.

      Example of a page with logs

      image

      Learn more on how to use logs.

    • Traces.

      In the query string, select project and service one by one and click Execute.

      Example of a page with traces

      image

      Learn more on how to use traces.

Was the article helpful?

Previous
OpenTelemetry SDK
Next
Java demo application example with an agent
© 2026 Direct Cursus Technology L.L.C.