Skip to content

Commit

Permalink
Merge branch 'main' into alanwest/metric-options-console-exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
cijothomas authored Feb 23, 2022
2 parents e66970d + 843d6fd commit b1c86e0
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 55 deletions.
1 change: 1 addition & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ coverage:
round: down
range: "70...100"
status:
project: off
patch: off

parsers:
Expand Down
12 changes: 2 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,6 @@ Add your fork as an origin:
git remote add fork https://github.com/YOUR_GITHUB_USERNAME/opentelemetry-dotnet.git
```

By default your work will be targeting the `main` branch. If you want to work on
the experimental metrics feature, please switch to the `metrics` feature branch:

```sh
# only do this when you want to work on the experimental metrics feature
git checkout metrics
```

Run tests:

```sh
Expand Down Expand Up @@ -174,8 +166,8 @@ A PR is considered to be **ready to merge** when:
* Urgent fix can take exception as long as it has been actively communicated.

Any Maintainer can merge the PR once it is **ready to merge**. Note, that some
PR may not be merged immediately if repo is being in process of a major release
and the new feature doesn't fit it.
PRs may not be merged immediately if the repo is in the process of a release and
the maintainers decided to defer the PR to the next release train.

If a PR has been stuck (e.g. there are lots of debates and people couldn't agree
on each other), the owner should try to get people aligned by:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ public override ExportResult Export(in Batch<LogRecord> logRecordBatch)

var request = new OtlpCollector.ExportLogsServiceRequest();

request.AddBatch(this.ProcessResource, logRecordBatch);

try
{
request.AddBatch(this.ProcessResource, logRecordBatch);

if (!this.exportClient.SendExportRequest(request))
{
return ExportResult.Failure;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ public override ExportResult Export(in Batch<Metric> metrics)

var request = new OtlpCollector.ExportMetricsServiceRequest();

request.AddMetrics(this.ProcessResource, metrics);

try
{
request.AddMetrics(this.ProcessResource, metrics);

if (!this.exportClient.SendExportRequest(request))
{
return ExportResult.Failure;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ public override ExportResult Export(in Batch<Activity> activityBatch)

var request = new OtlpCollector.ExportTraceServiceRequest();

request.AddBatch(this.ProcessResource, activityBatch);

try
{
request.AddBatch(this.ProcessResource, activityBatch);

if (!this.exportClient.SendExportRequest(request))
{
return ExportResult.Failure;
Expand All @@ -81,7 +81,6 @@ public override ExportResult Export(in Batch<Activity> activityBatch)
catch (Exception ex)
{
OpenTelemetryProtocolExporterEventSource.Log.ExportMethodException(ex);

return ExportResult.Failure;
}
finally
Expand Down
20 changes: 20 additions & 0 deletions src/OpenTelemetry/BaseExportProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,26 @@

namespace OpenTelemetry
{
/// <summary>
/// Type of Export Processor to be used.
/// </summary>
public enum ExportProcessorType
{
/// <summary>
/// Use SimpleExportProcessor.
/// Refer to the <a href="https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#simple-processor">
/// specification</a> for more information.
/// </summary>
Simple,

/// <summary>
/// Use BatchExportProcessor.
/// Refer to <a href="https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#batching-processor">
/// specification</a> for more information.
/// </summary>
Batch,
}

/// <summary>
/// Implements processor that exports telemetry objects.
/// </summary>
Expand Down
38 changes: 0 additions & 38 deletions src/OpenTelemetry/ExportProcessorType.cs

This file was deleted.

0 comments on commit b1c86e0

Please sign in to comment.