Skip to content

Commit

Permalink
update sample
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierjohn committed Mar 29, 2024
1 parent e7c328f commit 5f52047
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion sample/WebApiVersioned/AddApiVersionMetadata.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace SampleWebApplicationSLI;
namespace SampleVersionedWebApplicationSLI;

using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.ModelBinding;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace SampleVersionedWebApplicationSLI;

using Microsoft.Extensions.Options;
using SampleWebApplicationSLI;
using ServiceLevelIndicators;

internal sealed class ConfigureServiceLevelIndicatorOptions : IConfigureOptions<ServiceLevelIndicatorOptions>
Expand Down
2 changes: 1 addition & 1 deletion sample/WebApiVersioned/ConfigureSwaggerDefaultOptions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace SampleWebApplicationSLI;
namespace SampleVersionedWebApplicationSLI;

using Asp.Versioning;
using Asp.Versioning.ApiExplorer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Mvc;
using ServiceLevelIndicators;
using static System.Runtime.InteropServices.JavaScript.JSType;

/// <summary>
/// Hello World controller.
Expand Down
9 changes: 0 additions & 9 deletions sample/WebApiVersioned/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using OpenTelemetry.Metrics;
using OpenTelemetry.Resources;
using SampleWebApplicationSLI;
using ServiceLevelIndicators;
using Microsoft.Extensions.Options;
using Swashbuckle.AspNetCore.SwaggerGen;
Expand Down Expand Up @@ -42,14 +41,6 @@
.WithMetrics(builder =>
{
builder.AddMeter(SampleApiMeters.MeterName);
builder.AddMeter("Microsoft.AspNetCore.Hosting");
builder.AddView("http.server.request.duration",
new ExplicitBucketHistogramConfiguration
{
Boundaries = [ 0, 0.005, 0.01, 0.025, 0.05,
0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ]
});
builder.AddOtlpExporter();
});

Expand Down
2 changes: 1 addition & 1 deletion sample/WebApiVersioned/SampleApiMeters.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace SampleWebApplicationSLI;
namespace SampleVersionedWebApplicationSLI;

using System.Diagnostics.Metrics;

Expand Down

0 comments on commit 5f52047

Please sign in to comment.