The Sumo Logic OTC Distro Configuration documentation is pretty good, but I was able to spend over 30 minutes reading through the docs without being instructed to actually start the collector with a functional configuration. We should offer users a complete example configuration that moves them one step closer to configuring real workloads using Sumo Logic with the Sumo Logic OTC Distro.
Add a new "Example configuration" heading (above the "Basic configuration" heading, or in place of it).
This section should provide a complete config.yaml example that users can copy and paste without modifications, and this configuration should provide a completely functional pipeline so that users can then start the collector and observe data is being delivered to their Sumo Logic account.
I would suggest that this example configuration use a filelog receiver that is configured to read log data from a non-standard log file (e.g. /tmp/sumologic-otc-example.log).
Why use a non-standard log file? Two reasons: 1) users might not be comfortable sending actual log data (yet), perhaps for fear of leaking sensitive data, or for other reasons. 2) choosing the right log file is tricky – we would want to avoid a system log file that could potentially be inactive at the moment the user is testing OTC (otherwise they might think something isn't working), and we might want to avoid a noisy log file like /var/log/messages because you don't necessarily want new users to drink directly from the fire hose. A known fake log file sets good expectations for the user – they wouldn't expect anything to happen without their intervention, and they get to control exactly when data is written to the file and thus get to see exactly how fast the collector sends their data to Sumo Logic!
Use environment variables!
When I saw that the Configuration documentation provided an example config.yaml file with a placeholder for my installation token (e.g. install_token: <token>), I started wondering if the OpenTelemetry Collector config file supported environment variables. It turns out that it does!
"The use and expansion of environment variables is supported in the Collector configuration."
If we would provide example config.yaml files with configuration parameters that reference environment variables, it's one less chance for users to misconfigure their collector – they can just copy and paste and set one or more environment variables:
Instruct users to verify the OTC pipeline by visiting their Sumo Logic account and starting a LiveTail, then run a command to append data to the configured log file. For example:
Related: #586
The Sumo Logic OTC Distro Configuration documentation is pretty good, but I was able to spend over 30 minutes reading through the docs without being instructed to actually start the collector with a functional configuration. We should offer users a complete example configuration that moves them one step closer to configuring real workloads using Sumo Logic with the Sumo Logic OTC Distro.
If I could suggest a minor revision, I'd make the following changes to the Configuration documentation:
Add a new "Example configuration" heading (above the "Basic configuration" heading, or in place of it).
This section should provide a complete
config.yaml
example that users can copy and paste without modifications, and this configuration should provide a completely functional pipeline so that users can then start the collector and observe data is being delivered to their Sumo Logic account.I would suggest that this example configuration use a
filelog
receiver that is configured to read log data from a non-standard log file (e.g./tmp/sumologic-otc-example.log
).Use environment variables!
When I saw that the Configuration documentation provided an example
config.yaml
file with a placeholder for my installation token (e.g.install_token: <token>
), I started wondering if the OpenTelemetry Collector config file supported environment variables. It turns out that it does!If we would provide example
config.yaml
files with configuration parameters that reference environment variables, it's one less chance for users to misconfigure their collector – they can just copy and paste and set one or more environment variables:Instruct users to verify the OTC pipeline by visiting their Sumo Logic account and starting a LiveTail, then run a command to append data to the configured log file. For example:
Do they see the message in LiveTail? SUCCESS!! 🎉
From here there are a number of ways the Configuration documentation could guide users to take very productive next steps:
/cc @pmm-sumo