Updating samples folder path (#857)

* Updating samples folder path

* Updating from Web to AspNetCore

* updating paths and namespaces

* merging docfx, markdownlint and spellcheck to docs.yml
merging integration-redis and integration-sql to integration.yml

* updating files to work on vscode

* creating extensions.json to simplify usage

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
This commit is contained in:
Eddy Nakamura 2020-07-21 14:18:51 -03:00 committed by GitHub
parent a2c4f9c630
commit 68d3c791e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
54 changed files with 380 additions and 406 deletions

View File

@ -125,3 +125,5 @@ csharp_preserve_single_line_blocks = true
[*.vb]
# Modifier preferences
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
[obj/**.cs]
generated_code = true

View File

@ -1,20 +0,0 @@
name: docfx
on:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- name: check out code
uses: actions/checkout@v2
- name: install docfx
run: choco install docfx -y
- name: run .\build\docfx.cmd
shell: cmd
run: .\build\docfx.cmd

48
.github/workflows/docs.yml vendored Normal file
View File

@ -0,0 +1,48 @@
name: docs
on:
pull_request:
branches: [ master ]
jobs:
docfx:
runs-on: windows-latest
steps:
- name: check out code
uses: actions/checkout@v2
- name: install docfx
run: choco install docfx -y
- name: run .\build\docfx.cmd
shell: cmd
run: .\build\docfx.cmd
markdownlint:
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v2
- name: install markdownlint-cli
run: sudo npm install -g markdownlint-cli
- name: run markdownlint
run: markdownlint .
misspell:
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v2
- name: install misspell
run: |
curl -L -o ./install-misspell.sh https://git.io/misspell
sh ./install-misspell.sh
- name: run misspell
run: ./bin/misspell -error .

View File

@ -1,15 +0,0 @@
name: SQL Integration Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-compose-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run sql docker-compose.integration
run: docker-compose --file=test/OpenTelemetry.Instrumentation.Dependencies.Tests/docker-compose.integration.yml --project-directory=. up --exit-code-from=sql_integration_tests --build

View File

@ -1,4 +1,4 @@
name: Redis Integration Tests
name: Integration Tests
on:
push:
@ -7,9 +7,16 @@ on:
branches: [ master ]
jobs:
build-compose-test:
redis-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run redis docker-compose.integration
run: docker-compose --file=test/OpenTelemetry.Instrumentation.StackExchangeRedis.Tests/docker-compose.integration.yml --project-directory=. up --exit-code-from=redis_integration_tests --build
run: docker-compose --file=test/OpenTelemetry.Instrumentation.StackExchangeRedis.Tests/docker-compose.integration.yml --project-directory=. up --exit-code-from=redis_integration_tests --build
sql-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run sql docker-compose.integration
run: docker-compose --file=test/OpenTelemetry.Instrumentation.Dependencies.Tests/docker-compose.integration.yml --project-directory=. up --exit-code-from=sql_integration_tests --build

View File

@ -1,19 +0,0 @@
name: markdownlint
on:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v2
- name: install markdownlint-cli
run: sudo npm install -g markdownlint-cli
- name: run markdownlint
run: markdownlint .

View File

@ -1,21 +0,0 @@
name: spellcheck
on:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v2
- name: install misspell
run: |
curl -L -o ./install-misspell.sh https://git.io/misspell
sh ./install-misspell.sh
- name: run misspell
run: ./bin/misspell -error .

5
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"recommendations": [
"ms-dotnettools.csharp"
]
}

View File

@ -2,5 +2,8 @@
"rewrap.wrappingColumn": 79,
"files.associations": {
".vsts/*.yml": "azure-pipelines"
}
},
"files.exclude": {
"**/obj": true
},
}

View File

@ -88,14 +88,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.ZPag
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.Console", "src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj", "{1AFFF251-3B0C-47CA-BE94-937083732C0A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Exporters", "samples\Exporters\Console\Exporters.csproj", "{47318988-CA8B-4C81-B55D-2FA11D295A49}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.Web", "samples\Exporters\Web\OpenTelemetry.Exporter.Web.csproj", "{25C06046-C7D0-46B4-AAAC-90C50C43DE7A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.Zipkin.Tests", "test\OpenTelemetry.Exporter.Zipkin.Tests\OpenTelemetry.Exporter.Zipkin.Tests.csproj", "{1D778D2E-9523-450E-A6E0-A36897C7E78E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTelemetry.Exporter.AspNet.Win", "samples\Exporters\AspNet\OpenTelemetry.Exporter.AspNet.Win.csproj", "{9A4E3A68-904B-4835-A3C8-F664B73098DB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.AspNet.Win", "src\OpenTelemetry.Instrumentation.AspNet.Win\OpenTelemetry.Instrumentation.AspNet.Win.csproj", "{B9EEACDD-CAFA-4B75-A18D-898E7DE21B17}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.AspNet.Tests.Win", "test\OpenTelemetry.Instrumentation.AspNet.Tests.Win\OpenTelemetry.Instrumentation.AspNet.Tests.Win.csproj", "{55CBAADE-7040-46D6-A845-F207B4F0E281}"
@ -117,12 +111,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ISSUE_TEMPLATE", "ISSUE_TEM
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{E69578EB-B456-4062-A645-877CD964528B}"
ProjectSection(SolutionItems) = preProject
.github\workflows\docs.yml = .github\workflows\docs.yml
.github\workflows\dotnet-core-cov.yml = .github\workflows\dotnet-core-cov.yml
.github\workflows\dotnet-core-linux.yml = .github\workflows\dotnet-core-linux.yml
.github\workflows\dotnet-core-win.yml = .github\workflows\dotnet-core-win.yml
.github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
.github\workflows\integration-redis.yml = .github\workflows\integration-redis.yml
.github\workflows\integration-sql.yml = .github\workflows\integration-sql.yml
.github\workflows\integration.yml = .github\workflows\integration.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C1542297-8763-4DF4-957C-489ED771C21D}"
@ -141,7 +135,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentati
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestApp.AspNetCore.2.1", "test\TestApp.AspNetCore.2.1\TestApp.AspNetCore.2.1.csproj", "{7CDA3F85-EA6F-45C4-B432-2559303355D4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTelemetry.Exporter.ZPages.Tests", "test\OpenTelemetry.Exporter.ZPages.Tests\OpenTelemetry.Exporter.ZPages.Tests.csproj", "{98F9556B-116F-49B5-9211-BB1D418446FF}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.ZPages.Tests", "test\OpenTelemetry.Exporter.ZPages.Tests\OpenTelemetry.Exporter.ZPages.Tests.csproj", "{98F9556B-116F-49B5-9211-BB1D418446FF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTelemetry.Samples.AspNet", "samples\AspNet\OpenTelemetry.Samples.AspNet.csproj", "{9A4E3A68-904B-4835-A3C8-F664B73098DB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Samples.Console", "samples\Console\OpenTelemetry.Samples.Console.csproj", "{FF3E6E08-E8E4-4523-B526-847CD989279F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Samples.AspNetCore", "samples\AspNetCore\OpenTelemetry.Samples.AspNetCore.csproj", "{0935622B-9377-4056-8343-AE6ECDC274CF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -241,22 +241,10 @@ Global
{1AFFF251-3B0C-47CA-BE94-937083732C0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1AFFF251-3B0C-47CA-BE94-937083732C0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1AFFF251-3B0C-47CA-BE94-937083732C0A}.Release|Any CPU.Build.0 = Release|Any CPU
{47318988-CA8B-4C81-B55D-2FA11D295A49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47318988-CA8B-4C81-B55D-2FA11D295A49}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47318988-CA8B-4C81-B55D-2FA11D295A49}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47318988-CA8B-4C81-B55D-2FA11D295A49}.Release|Any CPU.Build.0 = Release|Any CPU
{25C06046-C7D0-46B4-AAAC-90C50C43DE7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25C06046-C7D0-46B4-AAAC-90C50C43DE7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25C06046-C7D0-46B4-AAAC-90C50C43DE7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25C06046-C7D0-46B4-AAAC-90C50C43DE7A}.Release|Any CPU.Build.0 = Release|Any CPU
{1D778D2E-9523-450E-A6E0-A36897C7E78E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1D778D2E-9523-450E-A6E0-A36897C7E78E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D778D2E-9523-450E-A6E0-A36897C7E78E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1D778D2E-9523-450E-A6E0-A36897C7E78E}.Release|Any CPU.Build.0 = Release|Any CPU
{9A4E3A68-904B-4835-A3C8-F664B73098DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A4E3A68-904B-4835-A3C8-F664B73098DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A4E3A68-904B-4835-A3C8-F664B73098DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A4E3A68-904B-4835-A3C8-F664B73098DB}.Release|Any CPU.Build.0 = Release|Any CPU
{B9EEACDD-CAFA-4B75-A18D-898E7DE21B17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B9EEACDD-CAFA-4B75-A18D-898E7DE21B17}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B9EEACDD-CAFA-4B75-A18D-898E7DE21B17}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -281,6 +269,18 @@ Global
{98F9556B-116F-49B5-9211-BB1D418446FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{98F9556B-116F-49B5-9211-BB1D418446FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{98F9556B-116F-49B5-9211-BB1D418446FF}.Release|Any CPU.Build.0 = Release|Any CPU
{9A4E3A68-904B-4835-A3C8-F664B73098DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A4E3A68-904B-4835-A3C8-F664B73098DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A4E3A68-904B-4835-A3C8-F664B73098DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A4E3A68-904B-4835-A3C8-F664B73098DB}.Release|Any CPU.Build.0 = Release|Any CPU
{FF3E6E08-E8E4-4523-B526-847CD989279F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF3E6E08-E8E4-4523-B526-847CD989279F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF3E6E08-E8E4-4523-B526-847CD989279F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF3E6E08-E8E4-4523-B526-847CD989279F}.Release|Any CPU.Build.0 = Release|Any CPU
{0935622B-9377-4056-8343-AE6ECDC274CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0935622B-9377-4056-8343-AE6ECDC274CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0935622B-9377-4056-8343-AE6ECDC274CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0935622B-9377-4056-8343-AE6ECDC274CF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -288,14 +288,14 @@ Global
GlobalSection(NestedProjects) = preSolution
{F2F81E76-6A0E-466B-B673-EBBF1A9ED075} = {77C7929A-2EED-4AA6-8705-B5C443C8AA0F}
{CEB7F146-81DC-41DB-8015-140EC6A64E6C} = {0169B149-FB8B-46F4-9EF7-8A0E69F8FAAF}
{47318988-CA8B-4C81-B55D-2FA11D295A49} = {E359BB2B-9AEC-497D-B321-7DF2450C3B8E}
{25C06046-C7D0-46B4-AAAC-90C50C43DE7A} = {E359BB2B-9AEC-497D-B321-7DF2450C3B8E}
{9A4E3A68-904B-4835-A3C8-F664B73098DB} = {E359BB2B-9AEC-497D-B321-7DF2450C3B8E}
{A533C800-3DC3-4D04-90A7-0CE7A1E6BDB3} = {F1D0972B-38CF-49C2-9F4B-4C5DE02FB71D}
{E69578EB-B456-4062-A645-877CD964528B} = {F1D0972B-38CF-49C2-9F4B-4C5DE02FB71D}
{C1542297-8763-4DF4-957C-489ED771C21D} = {7CB2F02E-03FA-4FFF-89A5-C51F107623FD}
{D2E73927-5966-445C-94E9-EFE6F269C8D5} = {7CB2F02E-03FA-4FFF-89A5-C51F107623FD}
{7CDA3F85-EA6F-45C4-B432-2559303355D4} = {77C7929A-2EED-4AA6-8705-B5C443C8AA0F}
{9A4E3A68-904B-4835-A3C8-F664B73098DB} = {E359BB2B-9AEC-497D-B321-7DF2450C3B8E}
{FF3E6E08-E8E4-4523-B526-847CD989279F} = {E359BB2B-9AEC-497D-B321-7DF2450C3B8E}
{0935622B-9377-4056-8343-AE6ECDC274CF} = {E359BB2B-9AEC-497D-B321-7DF2450C3B8E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {55639B5C-0770-4A22-AB56-859604650521}

View File

@ -1,7 +1,7 @@
using System.Web.Mvc;
using System.Web.Routing;
namespace OpenTelemetry.Exporter.AspNet
namespace OpenTelemetry.Samples.AspNet
{
public class RouteConfig
{

View File

@ -1,7 +1,7 @@
using System.Net.Http.Formatting;
using System.Web.Http;
namespace OpenTelemetry.Exporter.AspNet
namespace OpenTelemetry.Samples.AspNet
{
public static class WebApiConfig
{

View File

@ -1,6 +1,6 @@
using System.Web.Mvc;
namespace OpenTelemetry.Exporter.AspNet.Controllers
namespace OpenTelemetry.Samples.AspNet.Controllers
{
public class HomeController : Controller
{

View File

@ -7,9 +7,9 @@ using System.Net.Http;
using System.Web.Http;
using System.Threading.Tasks;
using OpenTelemetry.Exporter.AspNet.Models;
using OpenTelemetry.Samples.AspNet.Models;
namespace OpenTelemetry.Exporter.AspNet.Controllers
namespace OpenTelemetry.Samples.AspNet.Controllers
{
public class WeatherForecastController : ApiController
{

View File

@ -1 +1 @@
<%@ Application Codebehind="Global.asax.cs" Inherits="OpenTelemetry.Exporter.AspNet.WebApiApplication" Language="C#" %>
<%@ Application Codebehind="Global.asax.cs" Inherits="OpenTelemetry.Samples.AspNet.WebApiApplication" Language="C#" %>

View File

@ -7,7 +7,7 @@ using OpenTelemetry.Context.Propagation;
using OpenTelemetry.Trace;
using OpenTelemetry.Trace.Configuration;
namespace OpenTelemetry.Exporter.AspNet
namespace OpenTelemetry.Samples.AspNet
{
public class WebApiApplication : HttpApplication
{

View File

@ -1,6 +1,6 @@
using System;
namespace OpenTelemetry.Exporter.AspNet.Models
namespace OpenTelemetry.Samples.AspNet.Models
{
public class WeatherForecast
{

View File

@ -83,23 +83,23 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\OpenTelemetry.Api\OpenTelemetry.Api.csproj">
<ProjectReference Include="..\..\src\OpenTelemetry.Api\OpenTelemetry.Api.csproj">
<Project>{99f8a331-05e9-45a5-89ba-4c54e825e5b2}</Project>
<Name>OpenTelemetry.Api</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\src\OpenTelemetry.Instrumentation.AspNet.Win\OpenTelemetry.Instrumentation.AspNet.Win.csproj">
<ProjectReference Include="..\..\src\OpenTelemetry.Instrumentation.AspNet.Win\OpenTelemetry.Instrumentation.AspNet.Win.csproj">
<Project>{b9eeacdd-cafa-4b75-a18d-898e7de21b17}</Project>
<Name>OpenTelemetry.Instrumentation.AspNet.Win</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\src\OpenTelemetry.Instrumentation.Dependencies\OpenTelemetry.Instrumentation.Dependencies.csproj">
<ProjectReference Include="..\..\src\OpenTelemetry.Instrumentation.Dependencies\OpenTelemetry.Instrumentation.Dependencies.csproj">
<Project>{d3ffbc59-2486-4f8f-bff1-fa95c84929e1}</Project>
<Name>OpenTelemetry.Instrumentation.Dependencies</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\src\OpenTelemetry.Exporter.Jaeger\OpenTelemetry.Exporter.Jaeger.csproj">
<ProjectReference Include="..\..\src\OpenTelemetry.Exporter.Jaeger\OpenTelemetry.Exporter.Jaeger.csproj">
<Project>{8d47e3cf-9ae3-42fe-9084-feb72d9ad769}</Project>
<Name>OpenTelemetry.Exporter.Jaeger</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\src\OpenTelemetry\OpenTelemetry.csproj">
<ProjectReference Include="..\..\src\OpenTelemetry\OpenTelemetry.csproj">
<Project>{ae3e3df5-4083-4c6e-a840-8271b0acde7e}</Project>
<Name>OpenTelemetry</Name>
</ProjectReference>

View File

@ -4,11 +4,11 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OpenTelemetry.Exporter.AspNet")]
[assembly: AssemblyTitle("OpenTelemetry.Samples.AspNet")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OpenTelemetry.Exporter.AspNet")]
[assembly: AssemblyProduct("OpenTelemetry.Samples.AspNet")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

View File

@ -1,38 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using Microsoft.AspNetCore.Mvc;
namespace API.Controllers
{
[ApiController]
[Route("[controller]")]
public class WeatherForecastController : ControllerBase
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
private static HttpClient httpClient = new HttpClient();
[HttpGet]
public IEnumerable<WeatherForecast> Get()
{
// Making an http call here to serve as an example of
// how dependency calls will be captured and treated
// automatically as child of incoming request.
var res = httpClient.GetStringAsync("http://google.com").Result;
var rng = new Random();
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateTime.Now.AddDays(index),
TemperatureC = rng.Next(-20, 55),
Summary = Summaries[rng.Next(Summaries.Length)]
})
.ToArray();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using Microsoft.AspNetCore.Mvc;
using OpenTelemetry.Samples.AspNetCore.Models;
namespace OpenTelemetry.Samples.AspNetCore.Controllers
{
[ApiController]
[Route("[controller]")]
public class WeatherForecastController : ControllerBase
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
private static HttpClient httpClient = new HttpClient();
[HttpGet]
public IEnumerable<WeatherForecast> Get()
{
// Making an http call here to serve as an example of
// how dependency calls will be captured and treated
// automatically as child of incoming request.
var res = httpClient.GetStringAsync("http://google.com").Result;
var rng = new Random();
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateTime.Now.AddDays(index),
TemperatureC = rng.Next(-20, 55),
Summary = Summaries[rng.Next(Summaries.Length)]
})
.ToArray();
}
}
}

View File

@ -1,15 +1,15 @@
using System;
namespace API
{
public class WeatherForecast
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF => 32 + (int)(this.TemperatureC / 0.5556);
public string Summary { get; set; }
}
}
using System;
namespace OpenTelemetry.Samples.AspNetCore.Models
{
public class WeatherForecast
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF => 32 + (int)(this.TemperatureC / 0.5556);
public string Summary { get; set; }
}
}

View File

@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
<ProjectReference Include="..\..\src\OpenTelemetry.Exporter.Jaeger\OpenTelemetry.Exporter.Jaeger.csproj" />
<ProjectReference Include="..\..\src\OpenTelemetry.Exporter.Zipkin\OpenTelemetry.Exporter.Zipkin.csproj" />
<ProjectReference Include="..\..\src\OpenTelemetry.Instrumentation.AspNetCore\OpenTelemetry.Instrumentation.AspNetCore.csproj" />
<ProjectReference Include="..\..\src\OpenTelemetry.Instrumentation.Dependencies\OpenTelemetry.Instrumentation.Dependencies.csproj" />
<ProjectReference Include="..\..\src\OpenTelemetry.Extensions.Hosting\OpenTelemetry.Extensions.Hosting.csproj" />
</ItemGroup>
</Project>

View File

@ -1,20 +1,20 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
namespace API
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
namespace OpenTelemetry.Samples.AspNetCore
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}

View File

@ -1,83 +1,83 @@
using System;
using System.IO;
using System.Reflection;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.OpenApi.Models;
using OpenTelemetry.Trace.Configuration;
namespace API
{
public class Startup
{
public Startup(IConfiguration configuration)
{
this.Configuration = configuration;
}
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "My API", Version = "v1" });
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
if (File.Exists(xmlPath))
{
c.IncludeXmlComments(xmlPath);
}
});
// Switch between Zipkin/Jaeger by commenting out one of the following.
/*
services.AddOpenTelemetry((builder) => builder.AddRequestInstrumentation().AddDependencyInstrumentation()
.UseJaegerActivityExporter(o =>
{
o.ServiceName = this.Configuration.GetValue<string>("Jaeger:ServiceName");
o.AgentHost = this.Configuration.GetValue<string>("Jaeger:Host");
o.AgentPort = this.Configuration.GetValue<int>("Jaeger:Port");
}));
*/
services.AddOpenTelemetry((builder) => builder.AddRequestInstrumentation().AddDependencyInstrumentation()
.UseZipkinExporter(o =>
{
o.ServiceName = this.Configuration.GetValue<string>("Zipkin:ServiceName");
o.Endpoint = new Uri(this.Configuration.GetValue<string>("Zipkin:Endpoint"));
}));
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseHttpsRedirection();
app.UseSwagger();
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
});
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
}
}
using System;
using System.IO;
using System.Reflection;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.OpenApi.Models;
using OpenTelemetry.Trace.Configuration;
namespace OpenTelemetry.Samples.AspNetCore
{
public class Startup
{
public Startup(IConfiguration configuration)
{
this.Configuration = configuration;
}
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "My API", Version = "v1" });
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
if (File.Exists(xmlPath))
{
c.IncludeXmlComments(xmlPath);
}
});
// Switch between Zipkin/Jaeger by commenting out one of the following.
/*
services.AddOpenTelemetry((builder) => builder.AddRequestInstrumentation().AddDependencyInstrumentation()
.UseJaegerActivityExporter(o =>
{
o.ServiceName = this.Configuration.GetValue<string>("Jaeger:ServiceName");
o.AgentHost = this.Configuration.GetValue<string>("Jaeger:Host");
o.AgentPort = this.Configuration.GetValue<int>("Jaeger:Port");
}));
*/
services.AddOpenTelemetry((builder) => builder.AddRequestInstrumentation().AddDependencyInstrumentation()
.UseZipkinExporter(o =>
{
o.ServiceName = this.Configuration.GetValue<string>("Zipkin:ServiceName");
o.Endpoint = new Uri(this.Configuration.GetValue<string>("Zipkin:Endpoint"));
}));
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseHttpsRedirection();
app.UseSwagger();
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
});
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
}
}

View File

@ -1,19 +1,19 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"Jaeger": {
"ServiceName": "jaeger-test",
"Host": "localhost",
"Port": 6831
},
"Zipkin": {
"ServiceName": "zipkin-test",
"Endpoint": "http://localhost:9411/api/v2/spans"
}
}
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"Jaeger": {
"ServiceName": "jaeger-test",
"Host": "localhost",
"Port": 6831
},
"Zipkin": {
"ServiceName": "zipkin-test",
"Endpoint": "http://localhost:9411/api/v2/spans"
}
}

View File

@ -1,4 +1,4 @@
// <copyright file="InstrumentationWithActivitySource.cs" company="OpenTelemetry Authors">
// <copyright file="InstrumentationWithActivitySource.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@ -25,7 +25,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Samples
namespace OpenTelemetry.Samples.Console
{
internal class InstrumentationWithActivitySource : IDisposable
{

View File

@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'OpenTelemetry.sln'))\build\Common.prod.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup>
<CodeAnalysisRuleSet>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'OpenTelemetry.sln'))/build/OpenTelemetry.prod.loose.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.3.0" />
<PackageReference Include="StackExchange.Redis" Version="2.1.58" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\OpenTelemetry.Instrumentation.Dependencies\OpenTelemetry.Instrumentation.Dependencies.csproj" />
<ProjectReference Include="..\..\src\OpenTelemetry.Instrumentation.StackExchangeRedis\OpenTelemetry.Instrumentation.StackExchangeRedis.csproj" />
<ProjectReference Include="..\..\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
<ProjectReference Include="..\..\src\OpenTelemetry.Exporter.OpenTelemetryProtocol\OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj" />
<ProjectReference Include="..\..\src\OpenTelemetry.Exporter.Prometheus\OpenTelemetry.Exporter.Prometheus.csproj" />
<ProjectReference Include="..\..\src\OpenTelemetry.Exporter.ZPages\OpenTelemetry.Exporter.ZPages.csproj" />
<ProjectReference Include="..\..\src\OpenTelemetry\OpenTelemetry.csproj" />
<ProjectReference Include="..\..\src\OpenTelemetry.Exporter.Zipkin\OpenTelemetry.Exporter.Zipkin.csproj" />
<ProjectReference Include="..\..\src\OpenTelemetry.Exporter.Jaeger\OpenTelemetry.Exporter.Jaeger.csproj" />
</ItemGroup>
</Project>

View File

@ -13,10 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
using System;
using CommandLine;
namespace Samples
namespace OpenTelemetry.Samples.Console
{
/// <summary>
/// Main samples entry point.
@ -52,7 +52,7 @@ namespace Samples
(OtlpOptions options) => TestOtlpExporter.Run(options.Endpoint),
errs => 1);
Console.ReadLine();
System.Console.ReadLine();
}
}

View File

@ -18,11 +18,10 @@ using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace.Configuration;
using OpenTelemetry.Trace.Export;
namespace Samples
namespace OpenTelemetry.Samples.Console
{
internal class TestConsoleExporter
{
@ -32,7 +31,7 @@ namespace Samples
// and use a single pipeline with a custom MyProcessor, and Console exporter.
using var openTelemetry = OpenTelemetrySdk.EnableOpenTelemetry(
(builder) => builder.AddActivitySource("MyCompany.MyProduct.MyWebServer")
.SetResource(Resources.CreateServiceResource("MyServiceName"))
.SetResource(Resources.Resources.CreateServiceResource("MyServiceName"))
.UseConsoleExporter(opt => opt.DisplayAsJson = options.DisplayAsJson,
(p) => p.AddProcessor((next) => new MyProcessor(next))));
@ -94,7 +93,7 @@ namespace Samples
}
}
Console.WriteLine("Press Enter key to exit.");
System.Console.WriteLine("Press Enter key to exit.");
return null;
}

View File

@ -13,24 +13,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
using System;
using System.Diagnostics;
using System.Net.Http;
using OpenTelemetry.Exporter.Console;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace.Configuration;
namespace Samples
namespace OpenTelemetry.Samples.Console
{
internal class TestHttpClient
{
internal static object Run()
{
Console.WriteLine("Hello World!");
System.Console.WriteLine("Hello World!");
using var openTelemetry = OpenTelemetrySdk.EnableOpenTelemetry(
(builder) => builder.AddHttpClientDependencyInstrumentation()
.SetResource(Resources.CreateServiceResource("http-service-example"))
.SetResource(Resources.Resources.CreateServiceResource("http-service-example"))
.AddActivitySource("http-client-test")
.UseConsoleExporter(opt => opt.DisplayAsJson = false));
@ -41,7 +38,7 @@ namespace Samples
client.GetStringAsync("http://bing.com").GetAwaiter().GetResult();
}
Console.ReadLine();
System.Console.ReadLine();
return null;
}

View File

@ -17,7 +17,7 @@ using System;
using OpenTelemetry.Trace.Configuration;
namespace Samples
namespace OpenTelemetry.Samples.Console
{
internal class TestJaegerExporter
{
@ -48,10 +48,10 @@ namespace Samples
{
sample.Start();
Console.WriteLine("Traces are being created and exported" +
System.Console.WriteLine("Traces are being created and exported" +
"to Jaeger in the background. Use Jaeger to view them." +
"Press ENTER to stop.");
Console.ReadLine();
System.Console.ReadLine();
}
return null;

View File

@ -14,13 +14,10 @@
// limitations under the License.
// </copyright>
using System;
using System.Diagnostics;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;
using OpenTelemetry.Trace.Configuration;
namespace Samples
namespace OpenTelemetry.Samples.Console
{
internal class TestOTelShimWithConsoleExporter
{
@ -30,7 +27,7 @@ namespace Samples
// and use Console exporter.
using var openTelemetry = OpenTelemetrySdk.EnableOpenTelemetry(
(builder) => builder.AddActivitySource("MyCompany.MyProduct.MyWebServer")
.SetResource(Resources.CreateServiceResource("MyServiceName"))
.SetResource(Resources.Resources.CreateServiceResource("MyServiceName"))
.UseConsoleExporter(opt => opt.DisplayAsJson = options.DisplayAsJson));
// The above line is required only in applications
@ -49,7 +46,7 @@ namespace Samples
span.End();
Console.WriteLine("Press Enter key to exit.");
System.Console.WriteLine("Press Enter key to exit.");
return null;
}

View File

@ -14,12 +14,9 @@
// limitations under the License.
// </copyright>
using System;
using OpenTelemetry.Exporter.OpenTelemetryProtocol;
using OpenTelemetry.Trace.Configuration;
namespace Samples
namespace OpenTelemetry.Samples.Console
{
internal static class TestOtlpExporter
{
@ -44,10 +41,10 @@ namespace Samples
{
sample.Start();
Console.WriteLine("Traces are being created and exported" +
System.Console.WriteLine("Traces are being created and exported" +
"to OTLP in the background." +
"Press ENTER to stop.");
Console.ReadLine();
System.Console.ReadLine();
}
return null;

View File

@ -24,13 +24,13 @@ using OpenTelemetry.Metrics.Configuration;
using OpenTelemetry.Metrics.Export;
using OpenTelemetry.Trace;
namespace Samples
namespace OpenTelemetry.Samples.Console
{
internal class TestPrometheusExporter
{
internal static async Task<object> RunAsync(int port, int pushIntervalInSecs, int totalDurationInMins)
{
Console.WriteLine($"OpenTelemetry Prometheus Exporter is making metrics available at http://localhost:{port}/metrics/");
System.Console.WriteLine($"OpenTelemetry Prometheus Exporter is making metrics available at http://localhost:{port}/metrics/");
/*
Following is sample prometheus.yml config. Adjust port,interval as needed.
@ -93,13 +93,13 @@ namespace Samples
await Task.Delay(1000);
var remaining = (totalDurationInMins * 60) - sw.Elapsed.TotalSeconds;
Console.WriteLine("Running and emitting metrics. Remaining time:" + (int)remaining + " seconds");
System.Console.WriteLine("Running and emitting metrics. Remaining time:" + (int)remaining + " seconds");
}
// Stopping
metricsHttpServer.Stop();
Console.WriteLine("Metrics server shutdown.");
Console.WriteLine("Press Enter key to exit.");
System.Console.WriteLine("Metrics server shutdown.");
System.Console.WriteLine("Press Enter key to exit.");
return null;
}

View File

@ -17,14 +17,12 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using OpenTelemetry.Instrumentation.StackExchangeRedis;
using OpenTelemetry.Trace;
using OpenTelemetry.Trace.Configuration;
using StackExchange.Redis;
namespace Samples
namespace OpenTelemetry.Samples.Console
{
internal class TestRedis
{
@ -67,7 +65,7 @@ namespace Samples
// Create a scoped activity. It will end automatically when using statement ends
using (activitySource.StartActivity("Main"))
{
Console.WriteLine("About to do a busy work");
System.Console.WriteLine("About to do a busy work");
for (var i = 0; i < 10; i++)
{
DoWork(db, activitySource);
@ -88,13 +86,13 @@ namespace Samples
{
db.StringSet("key", "value " + DateTime.Now.ToLongDateString());
Console.WriteLine("Doing busy work");
System.Console.WriteLine("Doing busy work");
Thread.Sleep(1000);
// run a command, in this case a GET
var myVal = db.StringGet("key");
Console.WriteLine(myVal);
System.Console.WriteLine(myVal);
}
catch (ArgumentOutOfRangeException e)
{

View File

@ -14,13 +14,12 @@
// limitations under the License.
// </copyright>
using System;
using System.Diagnostics;
using System.Threading;
using OpenTelemetry.Exporter.ZPages;
using OpenTelemetry.Trace.Configuration;
namespace Samples
namespace OpenTelemetry.Samples.Console
{
internal class TestZPagesExporter
{
@ -48,7 +47,7 @@ namespace Samples
// Create a scoped activity. It will end automatically when using statement ends
using (activitySource.StartActivity("Main"))
{
Console.WriteLine("About to do a busy work in Main");
System.Console.WriteLine("About to do a busy work in Main");
}
Thread.Sleep(3000);
@ -56,7 +55,7 @@ namespace Samples
// Create a scoped activity. It will end automatically when using statement ends
using (activitySource.StartActivity("Test"))
{
Console.WriteLine("About to do a busy work in Test");
System.Console.WriteLine("About to do a busy work in Test");
}
Thread.Sleep(5000);

View File

@ -15,12 +15,9 @@
// </copyright>
using System;
using System.Collections.Generic;
using System.Threading;
using OpenTelemetry.Trace;
using OpenTelemetry.Trace.Configuration;
namespace Samples
namespace OpenTelemetry.Samples.Console
{
internal class TestZipkinExporter
{
@ -42,10 +39,10 @@ namespace Samples
{
sample.Start();
Console.WriteLine("Traces are being created and exported" +
System.Console.WriteLine("Traces are being created and exported" +
"to Zipkin in the background. Use Zipkin to view them." +
"Press ENTER to stop.");
Console.ReadLine();
System.Console.ReadLine();
}
return null;

View File

@ -1,30 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'OpenTelemetry.sln'))\build\Common.prod.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup>
<CodeAnalysisRuleSet>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'OpenTelemetry.sln'))/build/OpenTelemetry.prod.loose.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.3.0" />
<PackageReference Include="StackExchange.Redis" Version="2.1.58" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\OpenTelemetry.Instrumentation.Dependencies\OpenTelemetry.Instrumentation.Dependencies.csproj" />
<ProjectReference Include="..\..\..\src\OpenTelemetry.Instrumentation.StackExchangeRedis\OpenTelemetry.Instrumentation.StackExchangeRedis.csproj" />
<ProjectReference Include="..\..\..\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
<ProjectReference Include="..\..\..\src\OpenTelemetry.Exporter.OpenTelemetryProtocol\OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj" />
<ProjectReference Include="..\..\..\src\OpenTelemetry.Exporter.Prometheus\OpenTelemetry.Exporter.Prometheus.csproj" />
<ProjectReference Include="..\..\..\src\OpenTelemetry.Exporter.ZPages\OpenTelemetry.Exporter.ZPages.csproj" />
<ProjectReference Include="..\..\..\src\OpenTelemetry\OpenTelemetry.csproj" />
<ProjectReference Include="..\..\..\src\OpenTelemetry.Exporter.Zipkin\OpenTelemetry.Exporter.Zipkin.csproj" />
<ProjectReference Include="..\..\..\src\OpenTelemetry.Exporter.Jaeger\OpenTelemetry.Exporter.Jaeger.csproj" />
</ItemGroup>
</Project>

View File

@ -1,24 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
<ProjectReference Include="..\..\..\src\OpenTelemetry.Exporter.Jaeger\OpenTelemetry.Exporter.Jaeger.csproj" />
<ProjectReference Include="..\..\..\src\OpenTelemetry.Exporter.Zipkin\OpenTelemetry.Exporter.Zipkin.csproj" />
<ProjectReference Include="..\..\..\src\OpenTelemetry.Instrumentation.AspNetCore\OpenTelemetry.Instrumentation.AspNetCore.csproj" />
<ProjectReference Include="..\..\..\src\OpenTelemetry.Instrumentation.Dependencies\OpenTelemetry.Instrumentation.Dependencies.csproj" />
<ProjectReference Include="..\..\..\src\OpenTelemetry.Extensions.Hosting\OpenTelemetry.Extensions.Hosting.csproj" />
</ItemGroup>
</Project>

View File

@ -22,7 +22,7 @@ You can configure the `ConsoleExporter` by following the directions below:
* `DisplayAsJson`: Boolean to show data as JSON.
See the
[`TestConsoleExporter.cs`](../../samples/Exporters/Console/TestConsoleExporter.cs)
[`TestConsoleExporter.cs`](../../samples/Console/TestConsoleExporter.cs)
for an example of how to use the exporter.
## References

View File

@ -29,7 +29,7 @@ You can configure the `JaegerExporter` by following the directions below:
agent. (default `65000`).
See the
[`TestJaegerExporter.cs`](../../samples/Exporters/Console/TestJaegerExporter.cs)
[`TestJaegerExporter.cs`](../../samples/Console/TestJaegerExporter.cs)
for an example of how to use the exporter.
## References

View File

@ -25,7 +25,7 @@ You can configure the `OtlpExporter` by following the directions below:
* `Headers`: Optional headers for the connection.
See the
[`TestOtlpExporter.cs`](../../samples/Exporters/Console/TestOtlpExporter.cs)
[`TestOtlpExporter.cs`](../../samples/Console/TestOtlpExporter.cs)
for an example of how to use the exporter.
## References

View File

@ -20,7 +20,7 @@ You can configure the `PrometheusExporter` by following the directions below:
* `Url`: The url to listen to. Typically it ends with `/metrics` like `http://localhost:9184/metrics/`.
See
[`TestPrometheusExporter.cs`](../../samples/Exporters/Console/TestPrometheusExporter.cs)
[`TestPrometheusExporter.cs`](../../samples/Console/TestPrometheusExporter.cs)
for example use.
## References

View File

@ -17,7 +17,7 @@ You can configure the `ZPagesExporter` by following the directions below:
* `RetentionTime`: The retention time (in milliseconds) for the metrics.
See the
[`TestZPagesExporter.cs`](../../samples/Exporters/Console/TestZPagesExporter.cs)
[`TestZPagesExporter.cs`](../../samples/Console/TestZPagesExporter.cs)
for an example of how to use the exporter.
## References

View File

@ -23,7 +23,7 @@ You can configure the `ZipkinExporter` by following the directions below:
* `UseShortTraceIds`: Value indicating whether short trace id should be used.
See
[`TestZipkinExporter.cs`](../../samples/Exporters/Console/TestZipkinExporter.cs)
[`TestZipkinExporter.cs`](../../samples/Console/TestZipkinExporter.cs)
for example use.
## References

View File

@ -26,7 +26,7 @@ using var openTelemetry = OpenTelemetrySdk.EnableOpenTelemetry(b => b
```
For a more detailed example see
[TestRedis](../../samples/Exporters/Console/TestRedis.cs).
[TestRedis](../../samples/Console/TestRedis.cs).
## References