Skip to content

distro: Add opt-in logs support #3673

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

Merged
merged 3 commits into from
Feb 14, 2025
Merged

Conversation

ysolomchenko
Copy link
Contributor

@ysolomchenko ysolomchenko commented Feb 7, 2025

Why

Fixes #3514

What

Add opt-in logs support. The user has to set OTEL_LOGS_EXPORTER env var to otlp to enable the OTLP gRPC logs exporter (default is none).

In a separate PR I will expand example with logging support.

@pellared pellared changed the title Add opt-in logs support distro: Add opt-in logs support Feb 7, 2025
@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 71.92982% with 16 lines in your changes missing coverage. Please review.

Project coverage is 79.43%. Comparing base (5076d5c) to head (6a1bf1a).

Files with missing lines Patch % Lines
distro/exporter.go 68.96% 7 Missing and 2 partials ⚠️
distro/otel.go 74.07% 5 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3673      +/-   ##
==========================================
- Coverage   79.56%   79.43%   -0.13%     
==========================================
  Files          88       88              
  Lines        3503     3560      +57     
==========================================
+ Hits         2787     2828      +41     
- Misses        643      655      +12     
- Partials       73       77       +4     
Flag Coverage Δ
Linux 79.15% <71.92%> (-0.12%) ⬇️
Windows 75.24% <71.92%> (-0.07%) ⬇️
macOS 75.25% <71.92%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pellared pellared marked this pull request as ready for review February 7, 2025 13:41
@pellared pellared requested review from a team as code owners February 7, 2025 13:41
@pellared pellared requested a review from MrAlias February 10, 2025 14:23
@pellared

This comment was marked as resolved.

@pellared pellared enabled auto-merge (squash) February 14, 2025 06:32
@pellared pellared disabled auto-merge February 14, 2025 06:33
@ysolomchenko ysolomchenko force-pushed the log-exporter branch 2 times, most recently from 79939c2 to e24d6b5 Compare February 14, 2025 08:41
@pellared pellared marked this pull request as draft February 14, 2025 09:07
pellared

This comment was marked as resolved.

@ysolomchenko ysolomchenko marked this pull request as ready for review February 14, 2025 09:24
@pellared pellared merged commit 12ea23b into signalfx:main Feb 14, 2025
12 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 14, 2025
@pellared
Copy link
Contributor

@ysolomchenko, thank you for your first contribution 🏅

@pellared
Copy link
Contributor

pellared commented May 7, 2025

Few notices for sake of https://docs.splunk.com/observability/en/gdi/get-data-in/application/go/configuration/advanced-go-otel-configuration.html update:

  • logs are disabled by default. user has to set OTEL_LOGS_EXPORTER=otlp to enable it so that logs are exported using OTLP gRPC exporter
  • setting SPLUNK_REALM does not affect where logs are send. the user can configure the endpoint by setting the OTLP gRPC exporter env vars. the most important ones are OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_LOGS_ENDPOINT
  • Right now, it is not possible to send logs directly to Splunk o11y. Users can only send logs via an OTel Collector with HEC exporter to send them to Splunk Platform (Log Observer Connect).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add opt-in logs support
4 participants