-
Notifications
You must be signed in to change notification settings - Fork 8
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
Append traces path to http endpoint #279
Conversation
b745799
to
73080ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks @pkanal 🎉
Adds some feedback and suggestions plus some nits about whitespace 😄
@@ -95,10 +97,12 @@ public static TracerProviderBuilder AddHoneycomb(this TracerProviderBuilder buil | |||
if (options.Debug) | |||
{ | |||
builder.AddConsoleExporter(); | |||
Console.WriteLine("DEBUG: HoneycombOptions"); | |||
Console.WriteLine(JsonSerializer.Serialize(options, new JsonSerializerOptions { WriteIndented = true })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Co-authored-by: Jamie Danielson <[email protected]> Co-authored-by: Mike Goldsmith <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks @pkanal
I left one minor suggestion regarding local variable naming 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Which problem is this PR solving? This PR follows up on #279 and adds the same logic to append `/v1/metrics` path to the endpoint if the protocol is `http/protobuf` or `http/json` ## Short description of the changes - Adds smoke tests for metrics - Consolidates tests with many cases using [`InlineData`](https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-with-dotnet-test#add-more-tests) - Adds logic to append `/v1/metrics` to the generic endpoint if a path is not already specified
Which problem is this PR solving?
This PR adds the logic to append
/v1/traces
to the generic endpoint if the protocol specified ishttp/protobuf
. It also refactors how fallback values are set and how environment values are set. This was necessary work in order to get the path to append properly for config values and env vars and overall allows us to test HoneycombOptions and EnvironmentOptions reliably.Short description of the changes
HoneycombOptions
andEnvironmentOptions
. Removed fallback values and defaults altogether fromEnvironmentOptions
, they should be handled in one place inHoneycombOptions
.HoneycombOptions
fromEnvironmentOptions
./v1/traces
path to generic endpoint if the protocol ishttp/protobuf
HoneycombOptions
whenDebug = true