Skip to content

Commit

Permalink
Merge branch 'main' into feature/container_app_job-detector
Browse files Browse the repository at this point in the history
  • Loading branch information
Kielek authored Sep 16, 2024
2 parents 8a5cc32 + d5a630f commit cfdb25c
Show file tree
Hide file tree
Showing 26 changed files with 767 additions and 90 deletions.
1 change: 0 additions & 1 deletion examples/kafka/ProduceConsumeHostedService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

using Confluent.Kafka;
using OpenTelemetry.Instrumentation.ConfluentKafka;

namespace Examples.ConfluentKafka;

Expand Down
1 change: 0 additions & 1 deletion examples/kafka/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using Confluent.Kafka;
using Examples.ConfluentKafka;
using OpenTelemetry.Instrumentation.ConfluentKafka;
using OpenTelemetry.Metrics;
using OpenTelemetry.Trace;

Expand Down
20 changes: 10 additions & 10 deletions src/OpenTelemetry.Exporter.Geneva/.publicApi/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ override OpenTelemetry.Exporter.Geneva.GenevaTraceExporter.Dispose(bool disposin
~override OpenTelemetry.Exporter.Geneva.GenevaLogExporter.Export(in OpenTelemetry.Batch<OpenTelemetry.Logs.LogRecord> batch) -> OpenTelemetry.ExportResult
~override OpenTelemetry.Exporter.Geneva.GenevaMetricExporter.Export(in OpenTelemetry.Batch<OpenTelemetry.Metrics.Metric> batch) -> OpenTelemetry.ExportResult
~override OpenTelemetry.Exporter.Geneva.GenevaTraceExporter.Export(in OpenTelemetry.Batch<System.Diagnostics.Activity> batch) -> OpenTelemetry.ExportResult
~static Microsoft.Extensions.Logging.GenevaLoggingExtensions.AddGenevaLogExporter(this OpenTelemetry.Logs.LoggerProviderBuilder builder) -> OpenTelemetry.Logs.LoggerProviderBuilder
~static Microsoft.Extensions.Logging.GenevaLoggingExtensions.AddGenevaLogExporter(this OpenTelemetry.Logs.LoggerProviderBuilder builder, string name, System.Action<OpenTelemetry.Exporter.Geneva.GenevaExporterOptions> configureExporter) -> OpenTelemetry.Logs.LoggerProviderBuilder
~static Microsoft.Extensions.Logging.GenevaLoggingExtensions.AddGenevaLogExporter(this OpenTelemetry.Logs.LoggerProviderBuilder builder, System.Action<OpenTelemetry.Exporter.Geneva.GenevaExporterOptions> configureExporter) -> OpenTelemetry.Logs.LoggerProviderBuilder
~static Microsoft.Extensions.Logging.GenevaLoggingExtensions.AddGenevaLogExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions options, System.Action<OpenTelemetry.Exporter.Geneva.GenevaExporterOptions> configure) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions
~static OpenTelemetry.Exporter.Geneva.GenevaExporterHelperExtensions.AddGenevaTraceExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder) -> OpenTelemetry.Trace.TracerProviderBuilder
~static OpenTelemetry.Exporter.Geneva.GenevaExporterHelperExtensions.AddGenevaTraceExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, string name, System.Action<OpenTelemetry.Exporter.Geneva.GenevaExporterOptions> configure) -> OpenTelemetry.Trace.TracerProviderBuilder
~static OpenTelemetry.Exporter.Geneva.GenevaExporterHelperExtensions.AddGenevaTraceExporter(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action<OpenTelemetry.Exporter.Geneva.GenevaExporterOptions> configure) -> OpenTelemetry.Trace.TracerProviderBuilder
~static OpenTelemetry.Exporter.Geneva.GenevaMetricExporterExtensions.AddGenevaMetricExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder) -> OpenTelemetry.Metrics.MeterProviderBuilder
~static OpenTelemetry.Exporter.Geneva.GenevaMetricExporterExtensions.AddGenevaMetricExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, string name, System.Action<OpenTelemetry.Exporter.Geneva.GenevaMetricExporterOptions> configure) -> OpenTelemetry.Metrics.MeterProviderBuilder
~static OpenTelemetry.Exporter.Geneva.GenevaMetricExporterExtensions.AddGenevaMetricExporter(this OpenTelemetry.Metrics.MeterProviderBuilder builder, System.Action<OpenTelemetry.Exporter.Geneva.GenevaMetricExporterOptions> configure) -> OpenTelemetry.Metrics.MeterProviderBuilder
static Microsoft.Extensions.Logging.GenevaLoggingExtensions.AddGenevaLogExporter(this OpenTelemetry.Logs.LoggerProviderBuilder! builder) -> OpenTelemetry.Logs.LoggerProviderBuilder!
static Microsoft.Extensions.Logging.GenevaLoggingExtensions.AddGenevaLogExporter(this OpenTelemetry.Logs.LoggerProviderBuilder! builder, string? name, System.Action<OpenTelemetry.Exporter.Geneva.GenevaExporterOptions!>? configureExporter) -> OpenTelemetry.Logs.LoggerProviderBuilder!
static Microsoft.Extensions.Logging.GenevaLoggingExtensions.AddGenevaLogExporter(this OpenTelemetry.Logs.LoggerProviderBuilder! builder, System.Action<OpenTelemetry.Exporter.Geneva.GenevaExporterOptions!>! configureExporter) -> OpenTelemetry.Logs.LoggerProviderBuilder!
static Microsoft.Extensions.Logging.GenevaLoggingExtensions.AddGenevaLogExporter(this OpenTelemetry.Logs.OpenTelemetryLoggerOptions! options, System.Action<OpenTelemetry.Exporter.Geneva.GenevaExporterOptions!>? configure) -> OpenTelemetry.Logs.OpenTelemetryLoggerOptions!
static OpenTelemetry.Exporter.Geneva.GenevaExporterHelperExtensions.AddGenevaTraceExporter(this OpenTelemetry.Trace.TracerProviderBuilder! builder) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Exporter.Geneva.GenevaExporterHelperExtensions.AddGenevaTraceExporter(this OpenTelemetry.Trace.TracerProviderBuilder! builder, string? name, System.Action<OpenTelemetry.Exporter.Geneva.GenevaExporterOptions!>? configure) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Exporter.Geneva.GenevaExporterHelperExtensions.AddGenevaTraceExporter(this OpenTelemetry.Trace.TracerProviderBuilder! builder, System.Action<OpenTelemetry.Exporter.Geneva.GenevaExporterOptions!>! configure) -> OpenTelemetry.Trace.TracerProviderBuilder!
static OpenTelemetry.Exporter.Geneva.GenevaMetricExporterExtensions.AddGenevaMetricExporter(this OpenTelemetry.Metrics.MeterProviderBuilder! builder) -> OpenTelemetry.Metrics.MeterProviderBuilder!
static OpenTelemetry.Exporter.Geneva.GenevaMetricExporterExtensions.AddGenevaMetricExporter(this OpenTelemetry.Metrics.MeterProviderBuilder! builder, string? name, System.Action<OpenTelemetry.Exporter.Geneva.GenevaMetricExporterOptions!>? configure) -> OpenTelemetry.Metrics.MeterProviderBuilder!
static OpenTelemetry.Exporter.Geneva.GenevaMetricExporterExtensions.AddGenevaMetricExporter(this OpenTelemetry.Metrics.MeterProviderBuilder! builder, System.Action<OpenTelemetry.Exporter.Geneva.GenevaMetricExporterOptions!>! configure) -> OpenTelemetry.Metrics.MeterProviderBuilder!
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#nullable enable

using System.Diagnostics;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
Expand All @@ -26,7 +28,7 @@ public static TracerProviderBuilder AddGenevaTraceExporter(this TracerProviderBu
/// Adds <see cref="GenevaTraceExporter"/> to the <see cref="TracerProviderBuilder"/>.
/// </summary>
/// <param name="builder"><see cref="TracerProviderBuilder"/> builder to use.</param>
/// <param name="configure">Exporter configuration options.</param>
/// <param name="configure">Callback action for configuring <see cref="GenevaExporterOptions"/>.</param>
/// <returns>The instance of <see cref="TracerProviderBuilder"/> to chain the calls.</returns>
public static TracerProviderBuilder AddGenevaTraceExporter(this TracerProviderBuilder builder, Action<GenevaExporterOptions> configure)
=> AddGenevaTraceExporter(builder, name: null, configure);
Expand All @@ -35,10 +37,13 @@ public static TracerProviderBuilder AddGenevaTraceExporter(this TracerProviderBu
/// Adds <see cref="GenevaTraceExporter"/> to the <see cref="TracerProviderBuilder"/>.
/// </summary>
/// <param name="builder"><see cref="TracerProviderBuilder"/> builder to use.</param>
/// /// <param name="name">Name which is used when retrieving options.</param>
/// <param name="configure">Exporter configuration options.</param>
/// <param name="name">Optional name which is used when retrieving options.</param>
/// <param name="configure">Optional callback action for configuring <see cref="GenevaExporterOptions"/>.</param>
/// <returns>The instance of <see cref="TracerProviderBuilder"/> to chain the calls.</returns>
public static TracerProviderBuilder AddGenevaTraceExporter(this TracerProviderBuilder builder, string name, Action<GenevaExporterOptions> configure)
public static TracerProviderBuilder AddGenevaTraceExporter(
this TracerProviderBuilder builder,
string? name,
Action<GenevaExporterOptions>? configure)
{
Guard.ThrowIfNull(builder);

Expand Down Expand Up @@ -89,7 +94,9 @@ public static TracerProviderBuilder AddGenevaTraceExporter(this TracerProviderBu
});
}

private static BaseProcessor<Activity> BuildGenevaTraceExporter(GenevaExporterOptions options, BatchExportActivityProcessorOptions batchActivityExportProcessor)
private static BaseProcessor<Activity> BuildGenevaTraceExporter(
GenevaExporterOptions options,
BatchExportActivityProcessorOptions batchActivityExportProcessor)
{
#pragma warning disable CA2000 // Dispose objects before losing scope
var exporter = new GenevaTraceExporter(options);
Expand Down
10 changes: 6 additions & 4 deletions src/OpenTelemetry.Exporter.Geneva/GenevaLoggingExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#nullable enable

using System.Diagnostics;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
Expand All @@ -20,11 +22,11 @@ public static class GenevaLoggingExtensions
/// Adds <see cref="GenevaLogExporter"/> to the <see cref="OpenTelemetryLoggerOptions"/>.
/// </summary>
/// <param name="options"><see cref="OpenTelemetryLoggerOptions"/>.</param>
/// <param name="configure">Callback action for configuring <see cref="GenevaExporterOptions"/>.</param>
/// <param name="configure">Optional callback action for configuring <see cref="GenevaExporterOptions"/>.</param>
/// <returns>The instance of <see cref="OpenTelemetryLoggerOptions"/> to chain the calls.</returns>
public static OpenTelemetryLoggerOptions AddGenevaLogExporter(
this OpenTelemetryLoggerOptions options,
Action<GenevaExporterOptions> configure)
Action<GenevaExporterOptions>? configure)
{
Guard.ThrowIfNull(options);

Expand Down Expand Up @@ -71,8 +73,8 @@ public static LoggerProviderBuilder AddGenevaLogExporter(this LoggerProviderBuil
/// <returns>The instance of <see cref="LoggerProviderBuilder"/> to chain the calls.</returns>
public static LoggerProviderBuilder AddGenevaLogExporter(
this LoggerProviderBuilder builder,
string name,
Action<GenevaExporterOptions> configureExporter)
string? name,
Action<GenevaExporterOptions>? configureExporter)
{
var finalOptionsName = name ?? Options.Options.DefaultName;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#nullable enable

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using OpenTelemetry.Internal;
Expand All @@ -25,7 +27,7 @@ public static MeterProviderBuilder AddGenevaMetricExporter(this MeterProviderBui
/// Adds <see cref="GenevaMetricExporter"/> to the <see cref="MeterProviderBuilder"/>.
/// </summary>
/// <param name="builder"><see cref="MeterProviderBuilder"/> builder to use.</param>
/// <param name="configure">Exporter configuration options.</param>
/// <param name="configure">Callback action for configuring <see cref="GenevaMetricExporterOptions"/>.</param>
/// <returns>The instance of <see cref="MeterProviderBuilder"/> to chain the calls.</returns>
public static MeterProviderBuilder AddGenevaMetricExporter(this MeterProviderBuilder builder, Action<GenevaMetricExporterOptions> configure)
=> AddGenevaMetricExporter(builder, name: null, configure);
Expand All @@ -34,10 +36,13 @@ public static MeterProviderBuilder AddGenevaMetricExporter(this MeterProviderBui
/// Adds <see cref="GenevaMetricExporter"/> to the <see cref="MeterProviderBuilder"/>.
/// </summary>
/// <param name="builder"><see cref="MeterProviderBuilder"/> builder to use.</param>
/// /// <param name="name">Name which is used when retrieving options.</param>
/// <param name="configure">Exporter configuration options.</param>
/// <param name="name">Optional name which is used when retrieving options.</param>
/// <param name="configure">Optional callback action for configuring <see cref="GenevaMetricExporterOptions"/>.</param>
/// <returns>The instance of <see cref="MeterProviderBuilder"/> to chain the calls.</returns>
public static MeterProviderBuilder AddGenevaMetricExporter(this MeterProviderBuilder builder, string name, Action<GenevaMetricExporterOptions> configure)
public static MeterProviderBuilder AddGenevaMetricExporter(
this MeterProviderBuilder builder,
string? name,
Action<GenevaMetricExporterOptions>? configure)
{
Guard.ThrowIfNull(builder);

Expand All @@ -56,7 +61,9 @@ public static MeterProviderBuilder AddGenevaMetricExporter(this MeterProviderBui
});
}

private static PeriodicExportingMetricReader BuildGenevaMetricExporter(GenevaMetricExporterOptions options, Action<GenevaMetricExporterOptions> configure = null)
private static PeriodicExportingMetricReader BuildGenevaMetricExporter(
GenevaMetricExporterOptions options,
Action<GenevaMetricExporterOptions>? configure = null)
{
configure?.Invoke(options);

Expand Down
Loading

0 comments on commit cfdb25c

Please sign in to comment.