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

Commit 0fb6026

Browse files
Simon ZeltserSergeyKanzhelev
authored andcommitted
Updating ASP.NET Core getting started instructions (#102)
* Minor fix - updating zipkin sample so we can execute it from command line * Fix zipkin sample * Updated zipkin sample to follow the quickstart of opencensus.io for other languages * Revert the todo * Adding support for custom json file specification for obtaining service account credentials in Stackdriver metrics exporter * Changing Stackdriver sample code for metrics to use sum aggregation instead of distribution * Update ASP.NET Core collector instructions, also Stackdriver exporter instructions
1 parent e5f3822 commit 0fb6026

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ automatic data collection modules.
5252

5353
Incoming requests of ASP.NET Core app can be automatically tracked.
5454

55-
1. Install package to your project:
55+
1. Install packages to your project:
56+
[OpenCensus][opencensus-nuget-url]
5657
[OpenCensus.Collector.AspNetCore][opencensus-collect-aspnetcore-nuget-url]
5758

5859
2. Make sure `ITracer`, `ISampler`, and `IPropagationComponent` registered in DI.
@@ -71,7 +72,7 @@ Incoming requests of ASP.NET Core app can be automatically tracked.
7172
services.AddSingleton<RequestsCollector>();
7273
```
7374

74-
4. Initiate data collection by instantiating singleton in Configure method
75+
4. Initialize data collection by instantiating singleton in Configure method
7576
``` csharp
7677
public void Configure(IApplicationBuilder app, /*... other arguments*/ )
7778
{
@@ -204,6 +205,11 @@ finally
204205

205206
### Using Stackdriver Exporter
206207

208+
This sample assumes your code authenticates to Stackdriver APIs using [service account][gcp-auth] with
209+
credentials stored in environment variable GOOGLE_APPLICATION_CREDENTIALS.
210+
When you run on [GAE][GAE], [GKE][GKE] or locally with gcloud sdk installed - this is typically the case.
211+
There is also a constructor for specifying path to the service account credential. See [sample][stackdriver-sample] for details.
212+
207213
1. Add [Stackdriver Exporter package][opencensus-exporter-stackdriver-myget-url] reference.
208214
2. Enable [Stackdriver Trace][stackdriver-trace-setup] API.
209215
3. Enable [Stackdriver Monitoring][stackdriver-monitoring-setup] API.
@@ -298,6 +304,9 @@ deprecate it for 18 months before removing it, if possible.
298304
[ai-get-started]: https://docs.microsoft.com/azure/application-insights
299305
[stackdriver-trace-setup]: https://cloud.google.com/trace/docs/setup/
300306
[stackdriver-monitoring-setup]: https://cloud.google.com/monitoring/api/enable-api
307+
[GAE]: https://cloud.google.com/appengine/docs/flexible/dotnet/quickstart
308+
[GKE]: https://codelabs.developers.google.com/codelabs/cloud-kubernetes-aspnetcore/index.html?index=..%2F..index#0
309+
[gcp-auth]: https://cloud.google.com/docs/authentication/getting-started
301310
[semver]: http://semver.org/
302311
[ai-sample]: https://github.com/census-instrumentation/opencensus-csharp/blob/develop/src/Samples/TestApplicationInsights.cs
303312
[stackdriver-sample]: https://github.com/census-instrumentation/opencensus-csharp/blob/develop/src/Samples/TestStackdriver.cs

0 commit comments

Comments
 (0)