<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Send logs on Grafana Labs</title><link>https://grafana.com/docs/learning-hub/intro-to-send-data/02-send-logs/</link><description>Recent content in Send logs on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/learning-hub/intro-to-send-data/02-send-logs/index.xml" rel="self" type="application/rss+xml"/><item><title>OTLP for logs</title><link>https://grafana.com/docs/learning-hub/intro-to-send-data/02-send-logs/10-otlp-logs/</link><pubDate>Wed, 07 Oct 2026 11:08:53 -0500</pubDate><guid>https://grafana.com/docs/learning-hub/intro-to-send-data/02-send-logs/10-otlp-logs/</guid><content><![CDATA[&lt;h1 id=&#34;otlp-for-logs&#34;&gt;OTLP for logs&lt;/h1&gt;
&lt;p&gt;The Grafana Cloud OTLP endpoint accepts OpenTelemetry logs and routes them into Grafana Cloud Logs. Grafana stores them with extra fields beside the log line (structured metadata) and with labels you can use to filter streams.&lt;/p&gt;
&lt;p&gt;If you already run Grafana Alloy or another OpenTelemetry Collector, point its OTLP exporter at that endpoint. Other Collector distributions need additional setup. An SDK, a software library in your application, can send OTLP directly for non-production use, or when you cannot deploy a collector.&lt;/p&gt;

&lt;div class=&#34;learning-hub-image&#34;&gt;
  &lt;a href=&#34;otlp-logs-flow.svg&#34; title=&#34;An OpenTelemetry Collector sends OTLP logs to Grafana Cloud Logs&#34;&gt;
    &lt;img
      
      
      class=&#34;d-inline-block&#34;
      src=&#34;otlp-logs-flow.svg&#34;
      
      alt=&#34;An OpenTelemetry Collector sends OTLP logs to Grafana Cloud Logs&#34; width=&#34;700&#34; height=&#34;180&#34;/&gt;
    &lt;div class=&#34;learning-hub-image__zoom&#34;&gt;
      &lt;svg width=&#34;24&#34; height=&#34;24&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
        &lt;path d=&#34;M21 21L15 15M17 10C17 13.866 13.866 17 10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10Z&#34; stroke=&#34;currentColor&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
        &lt;path d=&#34;M10 7V13M7 10H13&#34; stroke=&#34;currentColor&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34;/&gt;
      &lt;/svg&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;

&lt;h2 id=&#34;considerations&#34;&gt;Considerations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The same endpoint accepts metrics, logs, and traces.&lt;/li&gt;
&lt;li&gt;Log attributes are stored as structured metadata. Some resource attributes, which describe where the log came from, are copied into labels.&lt;/li&gt;
&lt;li&gt;Grafana Alloy is the production collector. Another OpenTelemetry Collector needs additional setup. An SDK can send directly for non-production use, or when you cannot deploy a collector.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;documentation&#34;&gt;Documentation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/docs/grafana-cloud/send-data/otlp/send-data-otlp/&#34;&gt;Send data to the Grafana Cloud OTLP endpoint&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/docs/grafana-cloud/send-data/otlp/otlp-format-considerations/&#34;&gt;OTLP format considerations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="otlp-for-logs">OTLP for logs&lt;/h1>
&lt;p>The Grafana Cloud OTLP endpoint accepts OpenTelemetry logs and routes them into Grafana Cloud Logs. Grafana stores them with extra fields beside the log line (structured metadata) and with labels you can use to filter streams.&lt;/p></description></item><item><title>Push API for logs</title><link>https://grafana.com/docs/learning-hub/intro-to-send-data/02-send-logs/11-http-api-logs/</link><pubDate>Wed, 07 Oct 2026 11:08:53 -0500</pubDate><guid>https://grafana.com/docs/learning-hub/intro-to-send-data/02-send-logs/11-http-api-logs/</guid><content><![CDATA[&lt;h1 id=&#34;push-api-for-logs&#34;&gt;Push API for logs&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;POST /loki/api/v1/push&lt;/code&gt; is the endpoint that ingests log entries into Loki, which is the system behind Grafana Cloud Logs.&lt;/p&gt;
&lt;p&gt;The default request body is a Snappy-compressed Protocol Buffer message, a compressed binary format, with &lt;code&gt;Content-Type: application/x-protobuf&lt;/code&gt;. If you set &lt;code&gt;Content-Type: application/json&lt;/code&gt;, you can POST a JSON body instead. That body is a &lt;code&gt;streams&lt;/code&gt; array. Each stream has labels and a list of timestamped log lines.&lt;/p&gt;

&lt;div class=&#34;learning-hub-image&#34;&gt;
  &lt;a href=&#34;http-api-logs-flow.svg&#34; title=&#34;An HTTP client posts log entries to the Loki push API, which stores them in Grafana Cloud Logs&#34;&gt;
    &lt;img
      
      
      class=&#34;d-inline-block&#34;
      src=&#34;http-api-logs-flow.svg&#34;
      
      alt=&#34;An HTTP client posts log entries to the Loki push API, which stores them in Grafana Cloud Logs&#34; width=&#34;700&#34; height=&#34;180&#34;/&gt;
    &lt;div class=&#34;learning-hub-image__zoom&#34;&gt;
      &lt;svg width=&#34;24&#34; height=&#34;24&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
        &lt;path d=&#34;M21 21L15 15M17 10C17 13.866 13.866 17 10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10Z&#34; stroke=&#34;currentColor&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
        &lt;path d=&#34;M10 7V13M7 10H13&#34; stroke=&#34;currentColor&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34;/&gt;
      &lt;/svg&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;

&lt;h2 id=&#34;considerations&#34;&gt;Considerations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The API reference includes a curl example that posts one JSON stream.&lt;/li&gt;
&lt;li&gt;You can gzip the JSON body with &lt;code&gt;Content-Encoding: gzip&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can attach structured metadata to a log line by adding a JSON object of string keys and values after the line text.&lt;/li&gt;
&lt;li&gt;This is the ingest endpoint in the Loki HTTP API. It is separate from the query API, which is documented for reading Grafana Cloud Logs programmatically.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;documentation&#34;&gt;Documentation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/docs/loki/latest/reference/loki-http-api/#ingest-logs&#34;&gt;Loki HTTP API: ingest logs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/docs/grafana-cloud/send-data/logs/&#34;&gt;Send logs to Grafana Cloud&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="push-api-for-logs">Push API for logs&lt;/h1>
&lt;p>&lt;code>POST /loki/api/v1/push&lt;/code> is the endpoint that ingests log entries into Loki, which is the system behind Grafana Cloud Logs.&lt;/p>
&lt;p>The default request body is a Snappy-compressed Protocol Buffer message, a compressed binary format, with &lt;code>Content-Type: application/x-protobuf&lt;/code>. If you set &lt;code>Content-Type: application/json&lt;/code>, you can POST a JSON body instead. That body is a &lt;code>streams&lt;/code> array. Each stream has labels and a list of timestamped log lines.&lt;/p></description></item><item><title>Resources</title><link>https://grafana.com/docs/learning-hub/intro-to-send-data/02-send-logs/12-resources/</link><pubDate>Wed, 07 Oct 2026 11:08:53 -0500</pubDate><guid>https://grafana.com/docs/learning-hub/intro-to-send-data/02-send-logs/12-resources/</guid><content><![CDATA[&lt;h1 id=&#34;resources&#34;&gt;Resources&lt;/h1&gt;
&lt;p&gt;These pages cover the log methods in this section.&lt;/p&gt;
&lt;h2 id=&#34;documentation&#34;&gt;Documentation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/docs/grafana-cloud/send-data/logs/&#34;&gt;Send logs to Grafana Cloud&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/docs/grafana-cloud/send-data/otlp/send-data-otlp/&#34;&gt;Send data to the Grafana Cloud OTLP endpoint&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/docs/grafana-cloud/send-data/otlp/otlp-format-considerations/&#34;&gt;OTLP format considerations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/docs/loki/latest/reference/loki-http-api/#ingest-logs&#34;&gt;Loki HTTP API: ingest logs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;blog-posts&#34;&gt;Blog posts&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/blog/how-to-use-http-apis-to-send-metrics-and-logs-to-grafana-cloud/&#34;&gt;How to use HTTP APIs to send metrics and logs to Grafana Cloud&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;community&#34;&gt;Community&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://community.grafana.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana Community Forums&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://slack.grafana.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana Slack&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="resources">Resources&lt;/h1>
&lt;p>These pages cover the log methods in this section.&lt;/p>
&lt;h2 id="documentation">Documentation&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="/docs/grafana-cloud/send-data/logs/">Send logs to Grafana Cloud&lt;/a>&lt;/li>
&lt;li>&lt;a href="/docs/grafana-cloud/send-data/otlp/send-data-otlp/">Send data to the Grafana Cloud OTLP endpoint&lt;/a>&lt;/li>
&lt;li>&lt;a href="/docs/grafana-cloud/send-data/otlp/otlp-format-considerations/">OTLP format considerations&lt;/a>&lt;/li>
&lt;li>&lt;a href="/docs/loki/latest/reference/loki-http-api/#ingest-logs">Loki HTTP API: ingest logs&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="blog-posts">Blog posts&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="/blog/how-to-use-http-apis-to-send-metrics-and-logs-to-grafana-cloud/">How to use HTTP APIs to send metrics and logs to Grafana Cloud&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="community">Community&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://community.grafana.com/" target="_blank" rel="noopener noreferrer">Grafana Community Forums&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://slack.grafana.com/" target="_blank" rel="noopener noreferrer">Grafana Slack&lt;/a>&lt;/li>
&lt;/ul></description></item></channel></rss>