Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add documentation on how to use otel collector for ingesting logs to loki #11026

Merged
merged 5 commits into from
Nov 2, 2023

Conversation

sandeepsukhani
Copy link
Contributor

@sandeepsukhani sandeepsukhani commented Oct 25, 2023

What this PR does / why we need it:
In PR #10727, we added support for ingesting logs to loki in OTLP format. This PR adds the documentation on how to configure otel collector and how the data is mapped from OTLP format to Loki format.

Checklist

  • Documentation added

@sandeepsukhani sandeepsukhani requested a review from a team as a code owner October 25, 2023 12:41
@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Oct 25, 2023
Copy link
Contributor

@JStickler JStickler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[docs team] Nice job!

docs/sources/send-data/_index.md Outdated Show resolved Hide resolved
docs/sources/send-data/otel/_index.md Outdated Show resolved Hide resolved
docs/sources/send-data/otel/_index.md Outdated Show resolved Hide resolved
docs/sources/send-data/otel/_index.md Outdated Show resolved Hide resolved
To start ingesting logs in OpenTelemetry format, you need to enable `allow_structured_metadata` per tenant configuration (in the `limits_config`).

## Configure the OpenTelemetry Collector to write logs into Loki

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs an introductory sentence or two to explain that the following edits are made in the collector config file. It probably wouldn't hurt to drop in a link to https://opentelemetry.io/docs/collector/configuration/.

docs/sources/send-data/otel/_index.md Outdated Show resolved Hide resolved
docs/sources/send-data/otel/_index.md Outdated Show resolved Hide resolved
docs/sources/send-data/otel/_index.md Outdated Show resolved Hide resolved
docs/sources/send-data/otel/_index.md Outdated Show resolved Hide resolved
docs/sources/send-data/otel/_index.md Outdated Show resolved Hide resolved
sandeepsukhani and others added 2 commits October 30, 2023 14:50
Co-authored-by: J Stickler <julie.stickler@grafana.com>
Copy link
Contributor

@JStickler JStickler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[docs team] Just a couple more suggestions, but LGTM. Nice work!

docs/sources/send-data/otel/_index.md Outdated Show resolved Hide resolved
docs/sources/send-data/otel/_index.md Outdated Show resolved Hide resolved
docs/sources/send-data/otel/_index.md Outdated Show resolved Hide resolved
docs/sources/send-data/otel/_index.md Outdated Show resolved Hide resolved
docs/sources/send-data/otel/_index.md Outdated Show resolved Hide resolved
Co-authored-by: J Stickler <julie.stickler@grafana.com>
Copy link
Collaborator

@kavirajk kavirajk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 few minor clarifications


Loki does not support `.` or any other special characters other than `_` in label names. The unsupported characters are replace with an `_`.

For example, `service.name` in OTLP would become `service_name` in Loki.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applies also when querying it back I guess? Meaning you can only query with service_name and not service.name. Is it worth mentioning?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, will update the doc.

@sandeepsukhani sandeepsukhani merged commit e7ecb41 into main Nov 2, 2023
6 checks passed
@sandeepsukhani sandeepsukhani deleted the otel-documentation branch November 2, 2023 11:51
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JStickler @sandeepsukhani a nit, do we want to call out on this page that support this experimental?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevendungan It already has a note that it's experimental. Was there something more you wanted done? Or was there another page you meant to link to?
Otel_Experimental

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D'oh, never mind, I just realized this comment WAS on a specific page. 😛 I think we're fine. Users cannot configure OTEL without going to the page that has the experimental note on it.

rhnasc pushed a commit to inloco/loki that referenced this pull request Apr 12, 2024
…loki (grafana#11026)

**What this PR does / why we need it**:
In PR grafana#10727, we added support for ingesting logs to loki in OTLP
format. This PR adds the documentation on how to configure otel
collector and how the data is mapped from OTLP format to Loki format.

**Checklist**
- [x] Documentation added

---------

Co-authored-by: J Stickler <julie.stickler@grafana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants