Skip to content

Commit

Permalink
Merge branch 'main' into geneva-metricnamevalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch authored Feb 27, 2023
2 parents 648a956 + db2a24d commit 89a7051
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,16 @@ internal static class Transport
private const int MultiSpanBufferSize = 4096000;
private const int MultiSpanBufferLimit = 4070000;
private static readonly MediaTypeHeaderValue MEDIAHEADER = new MediaTypeHeaderValue("application/json");
private static readonly byte[] TracesBuffer;
private static bool isConfigured = false;
private static int backendTimeout = 0;
private static readonly byte[] TracesBuffer = new byte[MultiSpanBufferSize];
private static bool isConfigured;
private static int backendTimeout;
private static string configuredEndpoint = string.Empty;
private static string configuredAgentKey = string.Empty;
private static string bundleUrl = string.Empty;
private static InstanaHttpClient client;

static Transport()
{
TracesBuffer = new byte[MultiSpanBufferSize];
Configure();
}

Expand Down
7 changes: 2 additions & 5 deletions src/OpenTelemetry.Exporter.Instana/InstanaExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,15 @@

namespace OpenTelemetry.Exporter.Instana;

internal class InstanaExporter : BaseExporter<Activity>
internal sealed class InstanaExporter : BaseExporter<Activity>
{
private readonly IActivityProcessor activityProcessor;
private string name;
private ISpanSender spanSender = new SpanSender();
private IInstanaExporterHelper instanaExporterHelper = new InstanaExporterHelper();
private bool shutdownCalled;

public InstanaExporter(string name = "InstanaExporter", IActivityProcessor activityProcessor = null)
public InstanaExporter(IActivityProcessor activityProcessor = null)
{
this.name = name;

if (activityProcessor != null)
{
this.activityProcessor = activityProcessor;
Expand Down
8 changes: 4 additions & 4 deletions src/OpenTelemetry.Instrumentation.Runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ Runtime instrumentation should be enabled at application startup using the
```csharp
using var meterProvider = Sdk.CreateMeterProviderBuilder()
.AddRuntimeInstrumentation()
.AddPrometheusExporter()
.AddPrometheusHttpListener()
.Build();
```

Refer to [Program.cs](../../examples/runtime-instrumentation/Program.cs) for a
complete demo.

Additionally, this examples sets up the OpenTelemetry Prometheus exporter, which
requires adding the package
[`OpenTelemetry.Exporter.Prometheus`](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry.Exporter.Prometheus.HttpListener/README.md)
Additionally, the above example snippet sets up the OpenTelemetry Prometheus Exporter
HttpListener as well, which requires adding the package
[`OpenTelemetry.Exporter.Prometheus.HttpListener`](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry.Exporter.Prometheus.HttpListener/README.md)
to the application.

## Metrics
Expand Down

0 comments on commit 89a7051

Please sign in to comment.