Skip to content
This repository was archived by the owner on Dec 18, 2023. It is now read-only.

Commit f6a8cb4

Browse files
Improve Application Insights exporter (#82)
* doesn't compile * One test is passing now * Generalize test a bit more * more fixes * more failing tests * few more tests * make tests pass. More testsneeds to be uncommented * few more tests uncommented * implemented links and one more unit test * attributes on links * annotations support * mark checks that doesn't match ones in Local Forwarder * message events * safely add properties * fix build * update changelog * remove thread sleep for reliability and perf
1 parent d2b4b35 commit f6a8cb4

File tree

17 files changed

+2591
-49
lines changed

17 files changed

+2591
-49
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ the release.
77

88
## Unreleased
99

10+
- Application Insights exporter improvements - now understands http attributes
11+
and process links, annotations and messages.
1012
- ASP.NET Core collector now uses `http.route` for the span name.
1113

1214
## 0.1.0-alpha-33381

OpenCensus.sln

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.27703.2042
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.28407.52
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenCensus", "src\OpenCensus\OpenCensus.csproj", "{AE3E3DF5-4083-4C6E-A840-8271B0ACDE7E}"
77
EndProject
@@ -61,6 +61,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenCensus.Exporter.Ocagent
6161
EndProject
6262
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenCensus.Exporter.Stackdriver.Tests", "test\OpenCensus.Exporter.Stackdriver.Tests\OpenCensus.Exporter.Stackdriver.Tests.csproj", "{6875032B-DFDC-4CDE-A283-37CA7F99926A}"
6363
EndProject
64+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenCensus.Exporter.ApplicationInsights.Tests", "test\OpenCensus.Exporter.ApplicationInsights.Tests\OpenCensus.Exporter.ApplicationInsights.Tests.csproj", "{1FA1F509-7722-48E3-9A35-16CBB6774957}"
65+
EndProject
6466
Global
6567
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6668
Debug|Any CPU = Debug|Any CPU
@@ -127,6 +129,10 @@ Global
127129
{6875032B-DFDC-4CDE-A283-37CA7F99926A}.Debug|Any CPU.Build.0 = Debug|Any CPU
128130
{6875032B-DFDC-4CDE-A283-37CA7F99926A}.Release|Any CPU.ActiveCfg = Release|Any CPU
129131
{6875032B-DFDC-4CDE-A283-37CA7F99926A}.Release|Any CPU.Build.0 = Release|Any CPU
132+
{1FA1F509-7722-48E3-9A35-16CBB6774957}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
133+
{1FA1F509-7722-48E3-9A35-16CBB6774957}.Debug|Any CPU.Build.0 = Debug|Any CPU
134+
{1FA1F509-7722-48E3-9A35-16CBB6774957}.Release|Any CPU.ActiveCfg = Release|Any CPU
135+
{1FA1F509-7722-48E3-9A35-16CBB6774957}.Release|Any CPU.Build.0 = Release|Any CPU
130136
EndGlobalSection
131137
GlobalSection(SolutionProperties) = preSolution
132138
HideSolutionNode = FALSE

src/OpenCensus.Abstractions/Trace/IMessageEvent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
namespace OpenCensus.Trace
1818
{
1919
/// <summary>
20-
/// Message event happoened during the span execution.
20+
/// Message event happened during the span execution.
2121
/// </summary>
2222
public interface IMessageEvent
2323
{

src/OpenCensus.Abstractions/Trace/LinkType.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,18 @@ namespace OpenCensus.Trace
2222
public enum LinkType
2323
{
2424
/// <summary>
25-
/// Child link.
25+
/// The relationship of the two spans is unknown, or known but other than parent-child.
2626
/// </summary>
27-
ChildLinkedSpan,
27+
Unspecified = 0,
2828

2929
/// <summary>
30-
/// Parent link.
30+
/// The linked span is a child of the current span.
3131
/// </summary>
32-
ParentLinkedSpan,
32+
ChildLinkedSpan = 1,
33+
34+
/// <summary>
35+
/// The linked span is a parent of the current span.
36+
/// </summary>
37+
ParentLinkedSpan = 2,
3338
}
3439
}

src/OpenCensus.Abstractions/Trace/MessageEventType.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,19 @@ namespace OpenCensus.Trace
2121
/// </summary>
2222
public enum MessageEventType
2323
{
24+
/// <summary>
25+
/// Unknown event type.
26+
/// </summary>
27+
Unspecified = 0,
28+
2429
/// <summary>
2530
/// Represent message that was sent from client.
2631
/// </summary>
27-
Sent,
32+
Sent = 1,
2833

2934
/// <summary>
3035
/// Represents message that was recieved by the client.
3136
/// </summary>
32-
Recieved,
37+
Received = 2,
3338
}
3439
}

src/OpenCensus.Abstractions/Trace/SpanKind.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,19 @@ namespace OpenCensus.Trace
2121
/// </summary>
2222
public enum SpanKind
2323
{
24+
/// <summary>
25+
/// Span kind was not specified.
26+
/// </summary>
27+
Unspecified = 0,
28+
2429
/// <summary>
2530
/// Server span represents request incoming from external component.
2631
/// </summary>
27-
Server,
32+
Server = 1,
2833

2934
/// <summary>
3035
/// Client span represents outgoing request to the external component.
3136
/// </summary>
32-
Client,
37+
Client = 2,
3338
}
3439
}

0 commit comments

Comments
 (0)