-
Notifications
You must be signed in to change notification settings - Fork 9
As a CLI
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.
As mentioned in the User Guide, the first pre-requisite to using the tool is preparing the resource definition and at least one of metrics, logs and trace definition input files. If you are running a quick experiment or PoC, you may re-use the example definition files. Once the input files are ready, they can be passed to the tool using the below options:
Short form option | Long form option | Description |
---|---|---|
r | resourceDefinition | Path to the resource definition input file. |
m | metricDefinition | Path to the metric definition input file. |
l | logDefinition | Path to the log definition input file. |
s | spanDefinition | Path to the spans/traces definition input file. |
j | jsonFormat | Flag to indicate you want to use JSON format input files. YAML is default |
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 |
---|---|---|
authMode | Yes | Authorization mode. Valid values - none, basic. |
username | No | Username for the basic authorization. Mandatory if authMode=basic. |
password | No | Password for the basic authorization. Mandatory if authMode=basic. |
restURL | No | Object indicating endpoint URL(s) to post metrics, logs & traces. |
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. |
The restURL object has the following fields:
Field Name | Is Mandatory? | Description |
---|---|---|
baseURL | Yes | The base URL where metrics, logs & traces can be posted. |
metricsPath | No | Optional suffix for the baseURL in case the metrics endpoint is different. |
logsPath | No | Optional suffix for the baseURL in case the logs endpoint is different. |
tracesPath | No | Optional suffix for the baseURL in case the traces endpoint is different. |
This example should clarify any doubts.
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. |
See target.yaml
for REST & gRPC transports.
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.