Skip to content

Commit 7799b76

Browse files
authored
Merge pull request #14 from trakerr-com/develop
API v3 features.
2 parents aa39537 + 9448c91 commit 7799b76

File tree

12 files changed

+301
-86
lines changed

12 files changed

+301
-86
lines changed

IO.TrakerrClient/IO.TrakerrClient.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<WarningLevel>4</WarningLevel>
3333
</PropertyGroup>
3434
<ItemGroup>
35+
<Reference Include="Microsoft.VisualBasic" />
3536
<Reference Include="System" />
3637
<Reference Include="System.configuration" />
3738
<Reference Include="System.Core" />

IO.TrakerrClient/TrakerrClient.cs

Lines changed: 142 additions & 70 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ You can then populate other member data to send to Trakerr using accessors (see
127127
// You can set properties on AppEvent below like user, session, custom properties and more.
128128
appevent.EventUser = "john@trakerr.io";
129129
appevent.EventSession = "8";
130+
appevent.appevent.ContextOperationTimeMillis = 1000;
130131

131132
// Set some custom data
132133
appevent.CustomProperties = new CustomData();
@@ -194,6 +195,8 @@ public TrakerrClient(string apiKey = null, string contextAppVersion = null, stri
194195

195196
The TrakerrClient class also has a lot of exposed properties. The benefit to setting these immediately after after you create TrakerrClient is that AppEvent will default it's values against the TrakerClient that created it. This way if there is a value that all your AppEvents uses, and the constructor default value currently doesn't suit you; it may be easier to change it in TrakerrClient as it will become the default value for all AppEvents created after. A lot of these are populated by default value by the constructor, but you can populate them with whatever string data you want. The following table provides an in depth look at each of those.
196197

198+
If you're populating an app event directly, you'll want to take a look at the [AppEvent properties](generated/docs/AppEvent.md) as they contain properties unique to each AppEvent which do not have defaults you may set in the client.
199+
197200
Name | Type | Description | Notes
198201
------------ | ------------- | ------------- | -------------
199202
**apiKey** | **string** | API Key for your application. | Defaults to reading "trakerr.apiKey" property under appSettings from the App.config.
@@ -209,6 +212,8 @@ Name | Type | Description | Notes
209212
**contextAppOSBrowserVersion** | **string** | An optional string browser version the application is running on. | Defaults to `null`
210213
**contextDataCenter** | **string** | Data center the application is running on or connected to. | Defaults to `null`
211214
**contextDataCenterRegion** | **string** | Data center region. | Defaults to `null`
215+
**contextAppSKU** | **string** | Application SKU context. | Defaults to `null`
216+
**contextTags** | **List<string>** | Any tags that describe the the module that this handler is for. | Defaults to `null`
212217

213218
## Documentation for Models
214219

TrakerrSampleApp/App.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
55
</startup>
66
<appSettings>
7-
<add key="trakerr.apiKey" value="YourAPIkeyhere" />
7+
<add key="trakerr.apiKey" value="Your API key here" />
88
<add key="trakerr.url" value="https://www.trakerr.io/api/v1" />
99
<add key="trakerr.contextAppVersion" value="1.0" />
1010
<add key="trakerr.deploymentStage" value="development"/>

TrakerrSampleApp/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ static void Main(string[] args)
5050
appevent.CustomProperties = new CustomData();
5151
appevent.CustomProperties.StringData = new CustomStringData("This is string data 1!");//Add up to 10 custom strings.
5252
appevent.CustomProperties.StringData.CustomData2 = "This is string data 2!";//You can also add strings later like this.
53+
appevent.ContextOperationTimeMillis = 1000;
5354

5455
tc.SendEventAsync(appevent);
5556
}
@@ -63,7 +64,7 @@ static void Main(string[] args)
6364

6465
tc.SendEventAsync(infoevent);
6566

66-
Console.In.ReadLine();//Give time for the Async tasks to print to console for the sample app.
67+
//Console.In.ReadLine();//Give time for the Async tasks to print to console for the sample app.
6768
}
6869
}
6970
}

generated/IO.Trakerr.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 2012
33
VisualStudioVersion = 12.0.0.0
44
MinimumVisualStudioVersion = 10.0.0.1
5-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Trakerr", "src\IO.Trakerr\IO.Trakerr.csproj", "{E4AC3EC0-A3C3-4272-94DA-7C20E00AA3A6}"
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Trakerr", "src\IO.Trakerr\IO.Trakerr.csproj", "{3D68940C-B90A-43A4-8B7A-3B2A08FDEBE5}"
66
EndProject
77
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Trakerr.Test", "src\IO.Trakerr.Test\IO.Trakerr.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
88
EndProject
@@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU
1212
Release|Any CPU = Release|Any CPU
1313
EndGlobalSection
1414
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15-
{E4AC3EC0-A3C3-4272-94DA-7C20E00AA3A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16-
{E4AC3EC0-A3C3-4272-94DA-7C20E00AA3A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
17-
{E4AC3EC0-A3C3-4272-94DA-7C20E00AA3A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
18-
{E4AC3EC0-A3C3-4272-94DA-7C20E00AA3A6}.Release|Any CPU.Build.0 = Release|Any CPU
15+
{3D68940C-B90A-43A4-8B7A-3B2A08FDEBE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{3D68940C-B90A-43A4-8B7A-3B2A08FDEBE5}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{3D68940C-B90A-43A4-8B7A-3B2A08FDEBE5}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{3D68940C-B90A-43A4-8B7A-3B2A08FDEBE5}.Release|Any CPU.Build.0 = Release|Any CPU
1919
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2020
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
2121
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU

generated/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c
66

77
- API version: 1.0.0
88
- SDK version: 1.0.0
9-
- Build date: 2017-03-13T16:28:49.630-07:00
9+
- Build date: 2017-05-05T15:16:42.417-07:00
1010
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
1111

1212
## Frameworks supported

generated/docs/AppEvent.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**ApiKey** | **string** | API key generated for the application |
77
**LogLevel** | **string** | (optional) Logging level, one of &#39;debug&#39;,&#39;info&#39;,&#39;warning&#39;,&#39;error&#39;, &#39;fatal&#39;, defaults to &#39;error&#39; | [optional]
8-
**Classification** | **string** | (optional) one of &#39;error&#39; or a custom string for non-errors, defaults to &#39;error&#39; |
8+
**Classification** | **string** | (optional) one of &#39;issue&#39; or a custom string for non-issues, defaults to &#39;issue&#39; |
99
**EventType** | **string** | type of the event or error (eg. NullPointerException) |
1010
**EventMessage** | **string** | message containing details of the event or error |
1111
**EventTime** | **long?** | (optional) event time in ms since epoch | [optional]
@@ -24,6 +24,14 @@ Name | Type | Description | Notes
2424
**ContextAppOSVersion** | **string** | (optional) OS version the application is running on | [optional]
2525
**ContextDataCenter** | **string** | (optional) Data center the application is running on or connected to | [optional]
2626
**ContextDataCenterRegion** | **string** | (optional) Data center region | [optional]
27+
**ContextTags** | **List&lt;string&gt;** | | [optional]
28+
**ContextURL** | **string** | (optional) The full URL when running in a browser when the event was generated. | [optional]
29+
**ContextOperationTimeMillis** | **long?** | (optional) duration that this event took to occur in millis. Example - database call time in millis. | [optional]
30+
**ContextCpuPercentage** | **int?** | (optional) CPU utilization as a percent when event occured | [optional]
31+
**ContextMemoryPercentage** | **int?** | (optional) Memory utilization as a percent when event occured | [optional]
32+
**ContextCrossAppCorrelationId** | **string** | (optional) Cross application correlation ID | [optional]
33+
**ContextDevice** | **string** | (optional) Device information | [optional]
34+
**ContextAppSku** | **string** | (optional) Application SKU | [optional]
2735
**CustomProperties** | [**CustomData**](CustomData.md) | | [optional]
2836
**CustomSegments** | [**CustomData**](CustomData.md) | | [optional]
2937

generated/src/IO.Trakerr.Test/IO.Trakerr.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ limitations under the License.
8686
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
8787
<ItemGroup>
8888
<ProjectReference Include="..\IO.Trakerr\IO.Trakerr.csproj">
89-
<Project>{E4AC3EC0-A3C3-4272-94DA-7C20E00AA3A6}</Project>
89+
<Project>{3D68940C-B90A-43A4-8B7A-3B2A08FDEBE5}</Project>
9090
<Name>IO.Trakerr</Name>
9191
</ProjectReference>
9292
</ItemGroup>

generated/src/IO.Trakerr/Api/EventsApi.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ public ApiResponse<Object> EventsPostWithHttpInfo (AppEvent data)
265265

266266
return new ApiResponse<Object>(localVarStatusCode,
267267
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
268-
localVarResponse.StatusDescription);
268+
null);
269269
}
270270

271271
/// <summary>
@@ -342,7 +342,7 @@ public async System.Threading.Tasks.Task<ApiResponse<Object>> EventsPostAsyncWit
342342

343343
return new ApiResponse<Object>(localVarStatusCode,
344344
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
345-
localVarResponse.StatusDescription);
345+
null);
346346
}
347347

348348
}

0 commit comments

Comments
 (0)