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

feat: Add OTLP log endpoints (gRPC & HTTP) #1187

Merged
merged 22 commits into from
Jun 11, 2024

Conversation

MikeGoldsmith
Copy link
Contributor

@MikeGoldsmith MikeGoldsmith commented Jun 5, 2024

Which problem is this PR solving?

Adds support for receving OTLP logs. Only logs with a trace ID associated are handled and are sampled along with spans. Logs without a trace ID are forwarded to Honeycomb immediately like events without TraceIDs are.

Further work to add support for configurable correlation IDs will be done in later PRs.

Note: This is the 2.x version of adding OTLP Logs, see the following PR that tracks adding to 3.x on main branch:

Short description of the changes

  • Add OTLP endpoints gRPC & HTTP (http/proto & http/json) including support for gzip & zstd
  • Adds missing API key check for trace gRPC handler with tests
  • Add unit tests to verify endpoints and different encodings are handled
  • Add unit tests to verify logs with a Trace ID are added to collector and logs without a Trace ID are sent to libhoney for dispatch
  • Rename processTraceRequest to processOTLPRequest and use in otlp_trace
  • Rename OTLP trace endpoint func postOTLP to postOTLPTraces
  • Add MockCollector to aid with testing

@MikeGoldsmith MikeGoldsmith self-assigned this Jun 5, 2024
@MikeGoldsmith MikeGoldsmith added type: enhancement New feature or request version: bump minor A PR that adds behavior, but is backwards-compatible. labels Jun 5, 2024
@MikeGoldsmith MikeGoldsmith marked this pull request as ready for review June 11, 2024 12:19
@MikeGoldsmith MikeGoldsmith requested a review from a team as a code owner June 11, 2024 12:19
Copy link
Contributor

@kentquirk kentquirk left a comment

Choose a reason for hiding this comment

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

This looks really good! One very minor nit.

route/route.go Outdated Show resolved Hide resolved
@MikeGoldsmith MikeGoldsmith merged commit a1088e7 into 2.X-work-branch Jun 11, 2024
3 checks passed
@MikeGoldsmith MikeGoldsmith deleted the mike/2.x-otlp-logs branch June 11, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request version: bump minor A PR that adds behavior, but is backwards-compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants