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 otel tracing support for Refinery internal operations #1218

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

VinozzZ
Copy link
Contributor

@VinozzZ VinozzZ commented Jul 1, 2024

Which problem is this PR solving?

Enable otel tracing for debugging Refinery internal operations.

Short description of the changes

  • Add otel tracing configurations
  • inject a tracer on Refinery startup
  • Update github.com/honeycombio/opentelemetry-proto-go/otlp to v1.3.1

#1213

@VinozzZ VinozzZ requested a review from a team as a code owner July 1, 2024 22:11
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 great to enable tracing. Now, of course, we have to start using it, but at least this way it's available.

We should start using it in some places before we release a system that has it in the config, or people will think it's broken. That can be a separate PR, though.

config/metadata/configMeta.yaml Show resolved Hide resolved
config/cmdenv.go Outdated Show resolved Hide resolved

var sampleRatio float64 = 1.0 / float64(sampleRate)

headers := map[string]string{
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this is straight from R3, but I just noticed this is unconditionally adding the API Key headers, which is not what we say in the docs. We should be adding this APIKeyHeader only if APIKey is non-blank. That way we don't put the header if a user is sending the traces to some other OTel endpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's a check for APIKey on line 80 to only set up a tracer if APIKey is not empty

VinozzZ and others added 2 commits July 2, 2024 10:21
Co-authored-by: Kent Quirk <kentquirk@honeycomb.io>
Co-authored-by: Kent Quirk <kentquirk@honeycomb.io>
@VinozzZ VinozzZ self-assigned this Jul 2, 2024
@VinozzZ VinozzZ added the type: enhancement New feature or request label Jul 2, 2024
@VinozzZ VinozzZ added this to the v2.7 milestone Jul 2, 2024
@VinozzZ VinozzZ merged commit b658cf7 into main Jul 2, 2024
3 checks passed
@VinozzZ VinozzZ deleted the yingrong.tracing_support branch July 2, 2024 15:19
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants