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

[Exporter.Geneva] Add TLDLogExporter #874

Merged
merged 78 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
15802e5
Add ETW_TLD Exporter
utpilla Jun 29, 2022
1b809f2
Code changes to add TLDTraceExporter
utpilla Jul 7, 2022
9a63d30
More changes
utpilla Jul 7, 2022
d46983e
Merge remote-tracking branch 'origin/main' into utpilla/ETW-TLD
utpilla Jul 8, 2022
e379575
Merge remote-tracking branch 'origin/main' into utpilla/ETW-TLD
utpilla Jul 11, 2022
3f830c6
Code changes
utpilla Jul 12, 2022
eab2789
More changes
utpilla Jul 12, 2022
6714d12
Merge remote-tracking branch 'origin/main' into utpilla/ETW-TLD
utpilla Jul 19, 2022
8a2e7d2
More changes; Add JsonSerializer
utpilla Jul 21, 2022
717ed28
Merge remote-tracking branch 'origin/main' into utpilla/ETW-TLD
utpilla Jul 21, 2022
6254e1f
More changes
utpilla Jul 21, 2022
c1f628a
Merge remote-tracking branch 'origin/main' into utpilla/ETW-TLD
utpilla Jul 21, 2022
72a82d2
Update test file
utpilla Jul 21, 2022
41479c9
Mark types internal
utpilla Jul 21, 2022
ddf95c7
Fix CI
utpilla Jul 21, 2022
976f456
Remove extra whitespace
utpilla Jul 21, 2022
f7615f1
Merge branch 'main' into utpilla/ETW-TLD
utpilla Jul 26, 2022
eb10994
Merge remote-tracking branch 'origin/main' into utpilla/ETW-TLD
utpilla Aug 2, 2022
0d488b4
Use maxStringLength
utpilla Aug 2, 2022
6ea7223
Merge branch 'utpilla/ETW-TLD' of https://github.com/utpilla/opentele…
utpilla Aug 2, 2022
c61208e
Merge remote-tracking branch 'origin/main' into utpilla/ETW-TLD
utpilla Aug 3, 2022
1f0e8c7
Update Benchmarks
utpilla Aug 4, 2022
d11f5c1
Update TraceExporter Benchmarks
utpilla Aug 11, 2022
cb85dce
Merge remote-tracking branch 'origin/main' into utpilla/ETW-TLD
utpilla Aug 11, 2022
d1ab41d
Update Benchmark results
utpilla Aug 12, 2022
e243e52
Update Benchmark results
utpilla Aug 12, 2022
41876c2
Add TLDBenchmarks
utpilla Aug 22, 2022
b74fde1
Merge remote-tracking branch 'origin/main' into utpilla/ETW-TLD
utpilla Aug 23, 2022
f73bbc4
Merge with origin/main
utpilla Aug 23, 2022
c8a7184
Update TLDTraceExporter;Update benchmarks
utpilla Aug 24, 2022
f1d0f39
Merge branch 'main' into utpilla/ETW-TLD
utpilla Aug 24, 2022
77aa33b
Merge with orign/main
utpilla Aug 30, 2022
81c9386
Fix format
utpilla Aug 30, 2022
a501831
Merge remote-tracking branch 'origin/main' into utpilla/ETW-TLD
utpilla Aug 31, 2022
41737da
Update TraceLoggingDynamic.cs; Update exporter
utpilla Sep 1, 2022
c6e516a
Update Serialization benchmarks
utpilla Sep 1, 2022
fbc2ed8
More code changes
utpilla Sep 2, 2022
0e9c97a
Add TODO
utpilla Sep 2, 2022
a636000
UncheckedASCIIEncoding;EventBuilder GetRawFields
utpilla Sep 3, 2022
0201ff6
Merge remote-tracking branch 'origin/main' into utpilla/ETW-TLD
utpilla Sep 18, 2022
91e3323
Update TLDTraceExporter
utpilla Sep 19, 2022
8e39eee
Merge remote-tracking branch 'origin/main' into utpilla/ETW-TLD
utpilla Sep 19, 2022
299c6da
Remove whitespaces
utpilla Sep 19, 2022
9be0340
Add TLDLogExporter
utpilla Sep 22, 2022
42f082f
Merge remote-tracking branch 'origin/main' into utpilla/ETW-TLD
utpilla Sep 22, 2022
8100126
Add TLDLogExporter Benchmarks
utpilla Sep 23, 2022
592a1a6
Add scopes back
utpilla Sep 23, 2022
28b75fc
Update exporter code; update benchmark resutls; add unit test for Logs
utpilla Sep 25, 2022
7acd82a
Update TLDLogExporter benchmarks
utpilla Sep 26, 2022
308b1f9
Add TLDTraceExporter
utpilla Sep 27, 2022
ce52324
Fix formatting
utpilla Sep 27, 2022
e521601
Fix format
utpilla Sep 27, 2022
1504d17
Update TLDExporter code
utpilla Sep 27, 2022
114a40e
Merge remote-tracking branch 'origin/main' into utpilla/Add-TLDTraceE…
utpilla Sep 27, 2022
7f21db3
Address PR comments
utpilla Sep 28, 2022
58c474d
Merge remote-tracking branch 'origin/main' into utpilla/Add-TLDTraceE…
utpilla Oct 20, 2022
f45f771
Do not enable TLDTraceExporter; Add TODOs
utpilla Oct 20, 2022
9157483
Remove unnecessary using statement
utpilla Oct 20, 2022
a3fc35b
Merge remote-tracking branch 'origin/main' into utpilla/Add-TLDTraceE…
utpilla Jan 7, 2023
0d9f51c
Code changes
utpilla Jan 7, 2023
0fdea54
More changes
utpilla Jan 7, 2023
4675976
Merge with origin/main
utpilla Jan 7, 2023
26eb496
Code changes
utpilla Jan 7, 2023
adda5c8
Merge with Add-TLDTraceExporter
utpilla Jan 7, 2023
40c7b6f
Update TLDLogExporter with ExceptionStack and Scopes export
utpilla Jan 7, 2023
80d0da3
Update Benchmarks
utpilla Jan 7, 2023
0ae8b2e
Add TODOs
utpilla Jan 7, 2023
cb03358
Fix CI
utpilla Jan 8, 2023
04c1a27
Code changes
utpilla Jan 8, 2023
90e5626
Add only TLDLogEpxorter related changes
utpilla Jan 8, 2023
47c0c15
Remove examples
utpilla Jan 8, 2023
7419e73
Update JsonSerializer
utpilla Jan 9, 2023
2132220
Refactor code
utpilla Jan 10, 2023
af9791e
Fix CI
utpilla Jan 11, 2023
1895c2b
Merge branch 'main' into utpilla/Add-TLDLogExporter
utpilla Jan 11, 2023
b9799fd
Merge branch 'main' into utpilla/Add-TLDLogExporter
utpilla Jan 11, 2023
545c6ae
Remove unnecessary using statements
utpilla Jan 11, 2023
50b19bd
Merge branch 'main' into utpilla/Add-TLDLogExporter
utpilla Jan 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 51 additions & 4 deletions src/OpenTelemetry.Exporter.Geneva/GenevaLogExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
// </copyright>

using System;
using System.Runtime.InteropServices;
using OpenTelemetry.Exporter.Geneva.TldExporter;
using OpenTelemetry.Internal;
using OpenTelemetry.Logs;

Expand All @@ -37,10 +39,55 @@ public GenevaLogExporter(GenevaExporterOptions options)
Guard.ThrowIfNull(options);
Guard.ThrowIfNullOrWhitespace(options.ConnectionString);

var msgPackExporter = new MsgPackLogExporter(options);
this.IsUsingUnixDomainSocket = msgPackExporter.IsUsingUnixDomainSocket;
this.exportLogRecord = (in Batch<LogRecord> batch) => msgPackExporter.Export(in batch);
this.exporter = msgPackExporter;
bool useMsgPackExporter;
var connectionStringBuilder = new ConnectionStringBuilder(options.ConnectionString);
switch (connectionStringBuilder.Protocol)
{
case TransportProtocol.Etw:
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
throw new ArgumentException("ETW cannot be used on non-Windows operating systems.");
}

useMsgPackExporter = true;
break;

case TransportProtocol.Unix:
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
throw new ArgumentException("Unix domain socket should not be used on Windows.");
}

useMsgPackExporter = true;
break;

case TransportProtocol.EtwTld:
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
throw new ArgumentException("ETW/TLD cannot be used on non-Windows operating systems.");
}

useMsgPackExporter = false;
break;

default:
throw new ArgumentOutOfRangeException(nameof(connectionStringBuilder.Protocol));
}

if (useMsgPackExporter)
{
var msgPackLogExporter = new MsgPackLogExporter(options);
this.IsUsingUnixDomainSocket = msgPackLogExporter.IsUsingUnixDomainSocket;
this.exportLogRecord = (in Batch<LogRecord> batch) => msgPackLogExporter.Export(in batch);
this.exporter = msgPackLogExporter;
}
else
{
var tldLogExporter = new TldLogExporter(options);
this.IsUsingUnixDomainSocket = false;
this.exportLogRecord = (in Batch<LogRecord> batch) => tldLogExporter.Export(in batch);
this.exporter = tldLogExporter;
}
}

public override ExportResult Export(in Batch<LogRecord> batch)
Expand Down
Loading