Skip to content

As a CLI

Manpreet edited this page Oct 20, 2022 · 10 revisions

To run the telemetry generator in CLI mode, you will need to download the fat-jar, which packages all the dependencies, from the release artifacts. The options accepted by the CLI are of two categories as described below.

Input definitions

As mentioned in the User Guide, the first pre-requisite to using the tool is preparing the entity definition and at least one of metrics, logs and trace definition YAML files. If you are running a quick experiment or PoC, you may re-use the example definition files. Once the YAML files are ready, they can be passed to the tool using the below options:

Short form option Long form option Description
e entityDefinition Path to the entity definition YAML file.
m metricDefinition Path to the metric definition YAML file.
l logDefinition Path to the log definition YAML file.
s spanDefinition Path to the spans/traces definition YAML file.

Target environment

As of the first release, we support posting to any target environment over REST or gRPC using Basic authorization via CLI. The target environment where you want to post the generated telemetry data is specified by a YAML file which has the following fields:

Field Name Is Mandatory? Description
username Yes Username for the basic authorization.
password Yes Password for the basic authorization.
restURL No Endpoint URL, only required if you want to post the data using REST APIs.
gRPCHost No gRPC host, only required if you want to post the data using gRPC.
gRPCPort No gRPC port, only required if you want to post the data using gRPC.

Once you have this YAML ready, this should be provided to the CLI, along with the input definitions, using the below option:

Short form option Long form option Description
t target Path to the YAML containing details of the environment to target.

Logging

We are using logback for printing out the log messages and by default the message level is INFO. The messages will be written to the STDOUT as well as in the logs/generator.log file. At the default INFO level, some high level information about the status of the data generation is provided. In case you are running into an issue or you simply want to see all the data that is being generated in OpenTelemetry format, simply set LOG_LEVEL=DEBUG in the environment.

We are continuously adding new features and support for some much needed functionalities. All such work is being tracked via the open issues. Please feel free to open an issue if something you'd like to see is not available.

Clone this wiki locally