Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
0521dfa
Introduce OpenTelemetry.DependencyInjection and refactor SDK.
CodeBlanch Nov 18, 2022
d80bfe9
Merge from main.
CodeBlanch Nov 28, 2022
641fd3f
Manual merge fixes.
CodeBlanch Nov 28, 2022
2642179
Some refactoring.
CodeBlanch Nov 29, 2022
7486cc2
Renames.
CodeBlanch Nov 29, 2022
55c1e62
Bug fixes and refactoring.
CodeBlanch Nov 29, 2022
18e5a61
Cleanup and docs.
CodeBlanch Nov 30, 2022
535d8fe
More updates.
CodeBlanch Nov 30, 2022
a735a53
More cleanup.
CodeBlanch Nov 30, 2022
d2f237c
API updates.
CodeBlanch Nov 30, 2022
119514d
Namespace tweaks.
CodeBlanch Dec 1, 2022
cde4679
Refactoring and API changes.
CodeBlanch Dec 2, 2022
754a882
Example tweaks.
CodeBlanch Dec 2, 2022
a3b3bcd
Example cleanup.
CodeBlanch Dec 2, 2022
adf1a00
XML doc updates.
CodeBlanch Dec 2, 2022
6022f84
XML doc updates.
CodeBlanch Dec 2, 2022
1c1bf38
Bug fix.
CodeBlanch Dec 2, 2022
9cf302f
Test fixes.
CodeBlanch Dec 2, 2022
3a75954
Example fixup.
CodeBlanch Dec 2, 2022
6e29c32
Test fixup.
CodeBlanch Dec 2, 2022
bdff2bb
Test fixup.
CodeBlanch Dec 2, 2022
1274793
Example fixup.
CodeBlanch Dec 2, 2022
7f9b9a0
Test fixup.
CodeBlanch Dec 2, 2022
09ef294
Test fixup.
CodeBlanch Dec 2, 2022
c9f33ab
Test fixup.
CodeBlanch Dec 2, 2022
5a38dc0
Merge from main.
CodeBlanch Dec 2, 2022
3e89e15
CHANGELOG patch.
CodeBlanch Dec 2, 2022
d5e4be8
Add test project.
CodeBlanch Dec 2, 2022
7dfdb13
Cleanup.
CodeBlanch Dec 2, 2022
f972732
Added configure tests.
CodeBlanch Dec 2, 2022
adb8d89
MeterProviderBuilder extensions tests.
CodeBlanch Dec 2, 2022
311831e
TracerProviderBuilder extensions tests
CodeBlanch Dec 2, 2022
5a40ee5
Some README content.
CodeBlanch Dec 2, 2022
cf70bf4
CHANGELOG patch.
CodeBlanch Dec 2, 2022
339e28d
Doc updates.
CodeBlanch Dec 2, 2022
df95a5a
Example code fixes.
CodeBlanch Dec 2, 2022
99c0f84
Doc updates.
CodeBlanch Dec 2, 2022
8d895e9
Doc updates.
CodeBlanch Dec 2, 2022
fae1e39
Doc updates and cleanup.
CodeBlanch Dec 2, 2022
ae660bf
Doc updates.
CodeBlanch Dec 2, 2022
a6613f4
Skip ApiCompat on new project.
CodeBlanch Dec 2, 2022
47d6d87
API tweaks.
CodeBlanch Dec 3, 2022
164c0f1
Merge branch 'main' into dependencyinjection-package-refactor
CodeBlanch Dec 3, 2022
6015b06
Test fixes.
CodeBlanch Dec 3, 2022
e85f8ae
XML doc improvements.
CodeBlanch Dec 3, 2022
de72219
Tweaks.
CodeBlanch Dec 5, 2022
f9afd08
Merge from main.
CodeBlanch Dec 8, 2022
752ad56
Project file updates.
CodeBlanch Dec 8, 2022
b1848c0
Test fix.
CodeBlanch Dec 8, 2022
1b8c894
Project rename.
CodeBlanch Dec 8, 2022
6b2971f
Merge from main.
CodeBlanch Dec 8, 2022
91d6784
Manual fixes for merge from main.
CodeBlanch Dec 8, 2022
d95757e
More manual fixes for merge from main.
CodeBlanch Dec 8, 2022
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
Prev Previous commit
Next Next commit
Doc updates and cleanup.
  • Loading branch information
CodeBlanch committed Dec 2, 2022
commit fae1e39f0415ae135ec77dd7e38ccc7a56e3103e
2 changes: 1 addition & 1 deletion examples/MicroserviceExample/WebApi/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddSingleton<MessageSender>();

services.AddOpenTelemetry()
.WithTracing((builder) => builder
.WithTracing(builder => builder
.AddAspNetCoreInstrumentation()
.AddSource(nameof(MessageSender))
.AddZipkinExporter(b =>
Expand Down
4 changes: 2 additions & 2 deletions src/OpenTelemetry.Exporter.Jaeger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ implementation if you want to customize the generated `HttpClient`:

```csharp
services.AddOpenTelemetry()
.WithTracing((builder) => builder
.WithTracing(builder => builder
.AddJaegerExporter(o =>
{
o.Protocol = JaegerExportProtocol.HttpBinaryThrift;
Expand All @@ -101,7 +101,7 @@ services.AddOpenTelemetry()
client.DefaultRequestHeaders.Add("X-MyCustomHeader", "value");
return client;
};
}));
}))
.StartWithHost();
```

Expand Down
4 changes: 2 additions & 2 deletions src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function with your own implementation if you want to customize the generated

```csharp
services.AddOpenTelemetry()
.WithTracing((builder) => builder
.WithTracing(builder => builder
.AddOtlpExporter(o =>
{
o.Protocol = OtlpExportProtocol.HttpProtobuf;
Expand All @@ -138,7 +138,7 @@ services.AddOpenTelemetry()
client.DefaultRequestHeaders.Add("X-MyCustomHeader", "value");
return client;
};
}));
}))
.StartWithHost();
```

Expand Down
4 changes: 2 additions & 2 deletions src/OpenTelemetry.Exporter.Zipkin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ generated `HttpClient`:

```csharp
services.AddOpenTelemetry()
.WithTracing((builder) => builder
.WithTracing(builder => builder
.AddZipkinExporter(o => o.HttpClientFactory = () =>
{
HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Add("X-MyCustomHeader", "value");
return client;
}));
}))
.StartWithHost();
```

Expand Down
69 changes: 36 additions & 33 deletions src/OpenTelemetry.Instrumentation.AspNetCore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ using OpenTelemetry.Trace;

public void ConfigureServices(IServiceCollection services)
{
services.AddOpenTelemetryTracing((builder) => builder
.AddAspNetCoreInstrumentation()
.AddJaegerExporter()
);
services.AddOpenTelemetry()
.WithTracing(builder => builder
.AddAspNetCoreInstrumentation()
.AddJaegerExporter())
.StartWithHost();
}
```

Expand All @@ -84,10 +85,11 @@ services.Configure<AspNetCoreInstrumentationOptions>(options =>
};
});

services.AddOpenTelemetryTracing((builder) => builder
.AddAspNetCoreInstrumentation()
.AddJaegerExporter()
);
services.AddOpenTelemetry()
.WithTracing(builder => builder
.AddAspNetCoreInstrumentation()
.AddJaegerExporter())
.StartWithHost();
```

### Filter
Expand All @@ -103,14 +105,15 @@ The following code snippet shows how to use `Filter` to only allow GET
requests.

```csharp
services.AddOpenTelemetryTracing((builder) => builder
.AddAspNetCoreInstrumentation((options) => options.Filter = httpContext =>
{
// only collect telemetry about HTTP GET requests
return httpContext.Request.Method.Equals("GET");
})
.AddJaegerExporter()
);
services.AddOpenTelemetry()
.WithTracing(builder => builder
.AddAspNetCoreInstrumentation((options) => options.Filter = httpContext =>
{
// only collect telemetry about HTTP GET requests
return httpContext.Request.Method.Equals("GET");
})
.AddJaegerExporter())
.StartWithHost();
```

It is important to note that this `Filter` option is specific to this
Expand All @@ -131,24 +134,24 @@ The following code snippet shows how to enrich the activity using all 3
different options.

```csharp
services.AddOpenTelemetryTracing((builder) =>
{
builder.AddAspNetCoreInstrumentation(o =>
{
o.EnrichWithHttpRequest = (activity, httpRequest) =>
{
activity.SetTag("requestProtocol", httpRequest.Protocol);
};
o.EnrichWithHttpResponse = (activity, httpResponse) =>
services.AddOpenTelemetry()
.WithTracing(builder => builder
.AddAspNetCoreInstrumentation(o =>
{
activity.SetTag("responseLength", httpResponse.ContentLength);
};
o.EnrichWithException = (activity, exception) =>
{
activity.SetTag("exceptionType", exception.GetType().ToString());
};
})
});
o.EnrichWithHttpRequest = (activity, httpRequest) =>
{
activity.SetTag("requestProtocol", httpRequest.Protocol);
};
o.EnrichWithHttpResponse = (activity, httpResponse) =>
{
activity.SetTag("responseLength", httpResponse.ContentLength);
};
o.EnrichWithException = (activity, exception) =>
{
activity.SetTag("exceptionType", exception.GetType().ToString());
};
}))
.StartWithHost();
```

[Processor](../../docs/trace/extending-the-sdk/README.md#processor),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ following code snippet shows how to add additional tags using these options.
```csharp
services.AddOpenTelemetry()
.WithTracing(builder => builder
.AddGrpcClientInstrumentation((options) =>
.AddGrpcClientInstrumentation(options =>
{
options.EnrichWithHttpRequestMessage = (activity, httpRequestMessage) =>
{
Expand Down