Setting up a demo Java app and collecting telemetry
Getting started
Sign up for Yandex Cloud and create a billing account:
- Navigate to the management console
and log in to Yandex Cloud or create a new account. - On the Yandex Cloud Billing
page, make sure you have a billing account linked and it has theACTIVEorTRIAL_ACTIVEstatus. 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 delivery
In this example, you will install the Spring PetClinic
To install the demo application, you can temporarily create a Yandex Compute Cloud VM. Learn more about creating a suitable VM here.
Below are examples of commands for installing the demo application on Linux Ubuntu.
Warning
For the OTel Collector agent to work correctly, the VM or server must allow outgoing traffic on TCP port 443.
For the demo application to work correctly, the VM or server must allow incoming traffic on TCP ports 4317, 4318, and 8080.
If you are using a Compute Cloud VM, create and link to it a security group allowing these traffic types.
-
Install Git
and Java suitable for your OS. For example:sudo apt update sudo apt install -y git openjdk-17-jdk -
Download and install an OTel Collector
agent suitable for your OS. For example:wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.144.0/otelcol_0.144.0_linux_amd64.tar.gz tar xvf otelcol_0.144.0_linux_amd64.tar.gz -
Set environment variables containing data for agent authentication in Monium:
export MONIUM_PROJECT=folder__<folder_ID> export MONIUM_API_KEY=<API_key>Where:
-
<folder_ID>: ID of the folder to house your Monium project. -
<api_key>: Service account API key.This service account must have the
monium.telemetry.writerrole or more granular roles to writing metrics, logs, or traces. The API key must have theyc.monium.telemetry.writescope or narrower scopes for writing metrics, logs, or traces.
-
-
Create a file named
otel-collector.yamland paste the following contents to it:receivers: otlp: protocols: grpc: http: exporters: otlp_grpc/monium: compression: zstd endpoint: ingest.monium.yandex.cloud:443 headers: Authorization: "Api-Key ${env:MONIUM_API_KEY}" x-monium-project: "${env:MONIUM_PROJECT}" sending_queue: batch: service: pipelines: metrics: receivers: [ otlp ] exporters: [ otlp_grpc/monium ] traces: receivers: [ otlp ] exporters: [ otlp_grpc/monium ] logs: receivers: [ otlp ] exporters: [ otlp_grpc/monium ] telemetry: metrics: level: normal readers: - periodic: exporter: otlp: protocol: http/protobuf endpoint: http://localhost:4318 interval: 30000 timeout: 5000 -
Run the OTel Collector agent:
./otelcol --config otel-collector.yamlOnce active, the agent will start listening on ports
4317(gRPC) and4318(HTTP). -
Open a new terminal window, then download and build the
Spring PetClinicapplication:git clone https://github.com/spring-projects/spring-petclinic cd spring-petclinic ./mvnw -DskipTests packageResult:
... [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 53.308 s [INFO] Finished at: 2026-05-05T18:56:22Z [INFO] ------------------------------------------------------------------------ -
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 -
Run the demo application using the Java agent to send telemetry to OTel Collector:
cd ~/spring-petclinic OTEL_SERVICE_NAME=spring-petclinic \ OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE="delta" \ java -javaagent:./opentelemetry-javaagent.jar -jar target/*.jarResult:
... 2026-05-05T19:00:31.981Z INFO 3657 --- [ main] o.s.s.petclinic.PetClinicApplication : Started PetClinicApplication in 9.287 seconds (process running for 12.883) -
Open the running
Spring PetClinicdemo app in your browser:- If the application is installed on your local computer, its address is
http://localhost:8080. - If you used a VM to install the application, its address is
http://<VM_public_IP_address>:8080.
- If the application is installed on your local computer, its address is
-
Interact with the demo application UI as a user: open a menu, click a button, enter new owner details, schedule an appointment, etc.
Viewing telemetry in Monium
-
On the Monium
home page, select a data type section on the left:MetricsLogsTraces-
At the top, set the data search time period on the timeline.
-
In the search bar, enter a query to search for telemetry data:
-
project = <project_ID>: Select the project specified inx-monium-projectof the application's telemetry transmission configuration.This may be a cloud (
cloud__<cloud_ID>) or folder (folder__<folder_ID>) project, or another project. -
cluster = <cluster_name>: Select the name of the installation that runs your application. If no cluster is specified,cluster = defaultis used. -
service = <service_name>: Name of your application or service. You can use theOTEL_SERVICE_NAMEenvironment variable to provide it.If you do not see the required labels in the suggestions, you can enter them manually. However, the system most likely has not received data with these labels. See Data delivery troubleshooting for possible solutions.
-
-
Click Execute query or Execute.
The page will show data that matches the query.

More on metrics.
-
At the top, set the data search time period on the timeline.
-
In the search bar, enter a query to search for telemetry data:
-
project = <project_ID>: Select the project specified inx-monium-projectof the application's telemetry transmission configuration.This may be a cloud (
cloud__<cloud_ID>) or folder (folder__<folder_ID>) project, or another project. -
cluster = <cluster_name>: Select the name of the installation that runs your application. If no cluster is specified,cluster = defaultis used. -
service = <service_name>: Name of your application or service. You can use theOTEL_SERVICE_NAMEenvironment variable to provide it.If you do not see the required labels in the suggestions, you can enter them manually. However, the system most likely has not received data with these labels. See Data delivery troubleshooting for possible solutions.
-
-
Click Execute query or Execute.
The page will show data that matches the query.

More on logs.
-
At the top, set the data search time period on the timeline.
-
In the search bar, enter a query to search for telemetry data:
-
project = <project_ID>: Select the project specified inx-monium-projectof the application's telemetry transmission configuration.This may be a cloud (
cloud__<cloud_ID>) or folder (folder__<folder_ID>) project, or another project. -
cluster = <cluster_name>: Select the name of the installation that runs your application. If no cluster is specified,cluster = defaultis used. -
service = <service_name>: Name of your application or service. You can use theOTEL_SERVICE_NAMEenvironment variable to provide it.If you do not see the required labels in the suggestions, you can enter them manually. However, the system most likely has not received data with these labels. See Data delivery troubleshooting for possible solutions.
-
-
Click Execute query or Execute.
The page will show data that matches the query.

More on traces.
-
-
To view information about the data shard, select Shards on the left and then, the shard with your service name.