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: tracing of gateway requests #143

Merged
merged 5 commits into from
Jun 25, 2024
Merged

feat: tracing of gateway requests #143

merged 5 commits into from
Jun 25, 2024

Conversation

aschmahmann
Copy link
Contributor

@aschmahmann aschmahmann commented Jun 7, 2024

Updates some dependencies (ipfs/boxo#615) to improve tracing while also:

  1. Limiting tracing to gateway requests (and allowing probabilistic sampling here)
  • Note: the main motivator here was issues like tracing noise from DHT maintenance. This could be solved there as well, but solving at the application layer seemed reasonable
  1. Enabling limiting Traceparent tracing behind an Authorization header

cc @ns4plabs

@aschmahmann aschmahmann requested a review from lidel June 7, 2024 20:28
`Authorization` header. The value of the `Authorization` header should match
the value in the `RAINBOW_TRACING_AUTH` environment variable.

### `RAINBOW_SAMPLING_FRACTION`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In theory could invent an OTEL_TRACES_SAMPLER and OTEL_TRACES_SAMPLER_ARG if that makes more sense, but this seemed fine for now.

go.mod Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
},
&cli.Float64Flag{
Name: "sampling-fraction",
Value: 0,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should this default to 1 instead of 0? I'd been using 0 with some testing to prevent flooding as I was more interested in Traceheaders, but the default OTEL sampler is "parentbased_always_on".

Copy link
Contributor

@gammazero gammazero Jun 19, 2024

Choose a reason for hiding this comment

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

A value of zero seems like the expected default, so that no sampling is done.

@lidel lidel added the need/maintainers-input Needs input from the current maintainer(s) label Jun 11, 2024
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Lgtm.

Rebased on top of #150 to use release version of boxo and libp2p/go-libp2p-routing-helpers#84 + added changelog / some docs. Merging – I will continue and release tomorrow.

@lidel lidel merged commit 372bd4b into main Jun 25, 2024
13 checks passed
@lidel lidel deleted the feat/tracing branch June 25, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/maintainers-input Needs input from the current maintainer(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants