OpenTelemetry Exporter
You can export your log data directly to Mezmo with the OpenTelemetry Exporter. If you are already using OpenTelemetry Collector, you can start sending log data by adding the mezmo exporter to your existing pipelines. If you are new to OTEL, you can use this quick start example to get you up and running.
Set Up OpenTelemetry Exporter
The Mezmo Exporter only supports capturing log data. Metrics and Traces from OTEL will not be captured.
- Download the appropriate OTEL collector for your environment from the OpenTelemetry website.
- Create a configuration file called
config.yaml
with these contents:
receivers
filelog
include ./*.json
operators
type json_parser
exporters
mezmo
ingest_url"https://logs.mezmo.com/otel/ingest/rest"
ingest_key"<your ingestion key>"
service
pipelines
logs
receivers filelog
exporters mezmo
- Start the collector with this command:
--config=/path/to/config.yaml
- Create
.json
files in this directory. - As you add json lines to this file they will appear in the Log Viewer in Mezmo.
For complete information on setting up and configuring the OpenTelemetry Export for Mezmo log ingestion, check out the GitHub repo for the mezmoexporter.
For ingest_key
in the config.yaml
file, enter your Mezmo Ingestion Key. You can find this by logging into the Mezmo Web App, and navigating to Settings > Organization > API Keys.
otel
will be set at the default hostname for collector logs only if your logs don’t have a hostname set in the log metadata. You cannot set this metadata hostname in your collector configuration. Instead, recent changes to the collector configuration will enable the collector to recognize the hostname data from from incoming logs, and add that data to the internal OTEL representation of the log. The Mezmo OTEL Exporter will then attach the hostname data to the outgoing logs. For more information, see the OTel Exporter changelog in GitHub.