-
Notifications
You must be signed in to change notification settings - Fork 302
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
[Exporter.Geneva] Update OTel SDK prerelease version #1210
[Exporter.Geneva] Update OTel SDK prerelease version #1210
Conversation
…utpilla/opentelemetry-dotnet-contrib into utpilla/Update-OTel-Sdk-version
@@ -138,6 +138,8 @@ internal bool IsUsingUnixDomainSocket | |||
|
|||
internal int SerializeLogRecord(LogRecord logRecord) | |||
{ | |||
// `LogRecord.State` and `LogRecord.StateValues` were marked Obsolete in https://github.com/open-telemetry/opentelemetry-dotnet/pull/4334 | |||
#pragma warning disable 0618 |
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.
@cijothomas @CodeBlanch Okay with this change?
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.
Yes. Doing this suppress-warning, will be yet another validation that the main sdk has done everything in back-compat way!
AddGenevaTraceExporter(builder, sp.GetOptions<GenevaExporterOptions>(), configure); | ||
}); | ||
} | ||
var exporterOptions = sp.GetOptions<GenevaExporterOptions>(); |
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.
@CodeBlanch I have updated the extension methods for both GenevaTraceExporter and GenevaMetricExporter to use the newer DI APIs. Could you please review these changes?
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 good.
There are a couple things missing, but up to you if you want to shore it up 😄 I'll just drop details here you can tackle now or later if you want.
- Named options support is missing. Probably doesn't seem important, but I think because all signals share an options class it actually is very useful for GenevaExporter (& OtlpExporter).
- Options API integration won't work totally as expected.
I think 1 is pretty self-explanatory so I won't go into it but 2 maybe not as clear; here is an example:
appBuilder.Services.PostConfigure<GenevaExporterOptions>(o =>
{
o.ConnectionString = "[connection_string_2]";
});
appBuilder.Services.AddOpenTelemetry().WithTracing(builder =>
builder.AddGenevaTraceExporter(o => {
o.ConnectionString = "[connection_string_1]";
}));
In that snippet the user probably expected the "PostConfigure" delegate to run last. But the way the code is written, the inline one will win.
The reason for that is on line 40 below where we do configure?.Invoke(options);
that is executing it inline and not participating correctly in the Options API world.
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.
Thanks for sharing this insight! I'll address these in a different PR.
…utpilla/opentelemetry-dotnet-contrib into utpilla/Update-OTel-Sdk-version
Changes
1.5.0-rc.1
LogRecord.State
andLogRecord.StateValues
AddGenevaTraceExporter
andAddGenevaMetricExporter
methodsCHANGELOG.md
updated for non-trivial changes