Skip to main content

OTLP/HTTP Source

Thumbnail icon

An OTLP/HTTP Source is an endpoint for receiving OTLP-formatted Logs, Metrics, and Traces. This is an alternative option to installing an OpenTelemetry Collector for sending OTLP data to Sumo Logic.

Tracing Prerequisites

As indicated here, the following prerequisites apply before Sumo Logic can accept tracing data:

Account TypeAccount Level
CreditsEnterprise Operations and Enterprise Suite. Essentials get up to 5 GB a day.

Create an OTLP/HTTP Source

To configure an OTLP/HTTP Source:

  1. In the Sumo Logic web interface, select Manage Data > Collection > Collection
  2. On the Collection page, click Add Source next to a Hosted Collector.
  3. Select OTLP/HTTP
    OTLP:HTTP source icon
  4. Enter a Name for the Source. A description is optional. 
    OTLP basic configuration settings.png
  5. (Optional) For Source Host and Source Category, enter any string to tag the output collected from the source. These are built-in metadata fields that allow you to organize your data.
  6. Fields. Click the +Add Field link to define the fields you want to associate, each field needs a name (key) and value.
    • green check circle.png A green circle with a check mark is shown when the field exists in the Fields table schema.
    • orange exclamation point.png An orange triangle with an exclamation point is shown when the field doesn't exist in the Fields table schema. In this case, an option to automatically add the nonexistent fields to the Fields table schema is provided. If a field is sent to Sumo that does not exist in the Fields schema it is ignored, known as dropped.
  7. Set any of the following under Advanced Options for Logs
    OTLP advanced options part 1.png
    • Timestamp Parsing. This option is selected by default. If it's deselected, no timestamp information is parsed at all.
    • Time Zone. There are two options for Time Zone. You can use the time zone present in your log files, and then choose an option in case time zone information is missing from a log message. Or, you can have Sumo Logic completely disregard any time zone information present in logs by forcing a time zone. It's very important to have the proper time zone set, no matter which option you choose. If the time zone of logs can't be determined, Sumo Logic assigns logs UTC; if the rest of your logs are from another time zone your search results will be affected.
    • Timestamp Format. By default, Sumo Logic will automatically detect the timestamp format of your logs. However, you can manually specify a timestamp format for a Source. See [Timestamps, Time Zones, Time Ranges, and Date Formats](/docs/send-data/reference-information/time-reference for more information.
  8. Create any Processing Rules you'd like for the OTLP/HTTP Source. 
    OTLP processing rules.png
  9. When you are finished configuring the Source, click Save.
note
  • Metrics reported with a timestamp older than 24 hours ago or newer than 24 hours in the future from the time they are reported are dropped. Make sure that the Metrics sent to OTLP Endpoint have appropriate timestamps.
  • Sumo Logic enforces limits on the volume of metrics and associated metadata you ingest. For more information, see Data Limits for Metrics.

View the endpoint URL

If you need to access the Source's URL again, click Show URL.

img

Using the OTLP/HTTP Source

Data differentiation

When you set up an OTLP/HTTP Source, a unique URL is assigned to the Source. The exporter automatically appends the specific signal type when sending the data, as described by OpenTelemetry Protocol Exporter specification. The following table shows the URL format based on data types.

Data TypeURL Format
Logs<source_url>/v1/logs
Metrics<source_url>/v1/metrics
Traces<source_url>/v1/traces

OTLP/HTTP Exporter

To use the URL, include the url in otlphttp exporter of OpenTelemetry Collector and refer it in the pipelines, as needed. The exporter will automatically attach the signal type suffix:

exporters:
otlphttp:
endpoint: <source_url>

...

service:
pipelines:
logs:
...
exporters: [otlphttp]
metrics:
...
exporters: [otlphttp]
traces:
...
exporters: [otlphttp]

Alternative

It is also possible to optionally configure per-signal URL, e.g.

exporters:
otlphttp:
traces_endpoint: <source_url>/v1/traces
metrics_endpoint: <source_url>/v1/metrics
logs_endpoint: <source_url>/v1/logs

...

service:
pipelines:
logs:
...
exporters: [otlphttp]
metrics:
...
exporters: [otlphttp]
traces:
...
exporters: [otlphttp]

Auto-Instrumentation

If your application is configured using OpenTelemetry auto-instrumentation, you can also configure the OTLP endpoint using environment variables:

export OTEL_METRICS_EXPORTER=otlp
export OTEL_TRACES_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_ENDPOINT=<source_url>

JSON schema

Configuration Object

ParameterTypeRequiredDefaultDescriptionExample
nameStringYesnullType a desired name of the source. The name must be unique. This value is assigned to the metadata field _source."mySource"
automaticDateParsingBooleanNoTrueDetermines if timestamp information is parsed or not. Type true to enable automatic parsing of dates (the default setting); type false to disable. If disabled, no timestamp information is parsed at all.
multilineProcessingEnabledBooleanYesFalseType true to enable; type false to disable. The default setting is true. Consider setting to false to avoid unnecessary processing if you are collecting single message per line files (for example, Linux system.log). If you're working with multiline messages (for example, log4J or exception stack traces), keep this setting enabled.
useAutolineMatchingBooleanYesFalseType true to enable if you'd like message boundaries to be inferred automatically; type false to prevent message boundaries from being automatically inferred (equivalent to the Infer Boundaries option in the UI). The default setting is true.
contentTypeStringNoFalseDefined based on the Source you are creating.
forceTimeZoneBooleanNoFalseType true to force the Source to use a specific time zone, otherwise type false to use the time zone found in the logs. The default setting is false.
cutoffTimestampLongNo0 (collects all data)Only collect data from files with a modified date more recent than this timestamp, specified as milliseconds since epoch.
encodingStringNoUTF-8Defines the encoding form. Default is "UTF-8"; options include "UTF-16"; "UTF-16BE"; "UTF-16LE".
messagePerRequestBooleanYesWhen set to true, only a single message will be sent for each HTTP request. To disable this feature, set to false. You need to specify the common parameter multilineProcessingEnabled as false when setting messagePerRequest to true.
sourcetypeStringYesHTTP source

JSON example

{
"api.version":"v1",
"source":{
"name":"OTLP_HTTP_SOURCE",
"automaticDateParsing":true,
"multilineProcessingEnabled":false,
"useAutolineMatching":false,
"contentType":"Otlp",
"forceTimeZone":false,
"filters":[],
"cutoffTimestamp":0,
"encoding":"UTF-8",
"fields":{

},
"messagePerRequest":false,
"sourceType":"HTTP"
}
}
Legal
Privacy Statement
Terms of Use

Copyright © 2024 by Sumo Logic, Inc.