-
Notifications
You must be signed in to change notification settings - Fork 790
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removing Todos renaming parameter adding tests updating spanbuilderShim updating to internal renaming to spanAttributes solving build issue adding spec reference Continue Refactoring TracerProvider. (#1035) * optimize the flow * fix instrumenataion * move mroe things to provider ctor * move logic arounds Co-authored-by: Reiley Yang <[email protected]> changing to class and following spec to replace value replacing from default to null updating package adding xunit.runner renaming method * removing duplicated files * adding some tests and updating to default constructor * removing to be compliant to spec Co-authored-by: Cijo Thomas <[email protected]>
- Loading branch information
1 parent
f44952a
commit a3bf19d
Showing
27 changed files
with
251 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...y.Exporter.Jaeger.Tests/xunit.runner.json → build/xunit.runner.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"maxParallelThreads": 1, | ||
"parallelizeTestCollections": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
// <copyright file="SpanAttributes.cs" company="OpenTelemetry Authors"> | ||
// Copyright The OpenTelemetry Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// </copyright> | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
|
||
namespace OpenTelemetry.Trace | ||
{ | ||
/// <summary> | ||
/// A class that represents the span attributes. Read more here https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/common/common.md#attributes. | ||
/// </summary> | ||
public class SpanAttributes | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="SpanAttributes"/> class. | ||
/// </summary> | ||
public SpanAttributes() | ||
{ | ||
this.Attributes = new ActivityTagsCollection(); | ||
} | ||
|
||
internal ActivityTagsCollection Attributes { get; } | ||
|
||
/// <summary> | ||
/// Add entry to the attributes. | ||
/// </summary> | ||
/// <param name="key">Entry key.</param> | ||
/// <param name="value">Entry value.</param> | ||
public void Add(string key, long value) | ||
{ | ||
this.PrivateAdd(key, value); | ||
} | ||
|
||
/// <summary> | ||
/// Add entry to the attributes. | ||
/// </summary> | ||
/// <param name="key">Entry key.</param> | ||
/// <param name="value">Entry value.</param> | ||
public void Add(string key, string value) | ||
{ | ||
this.PrivateAdd(key, value); | ||
} | ||
|
||
/// <summary> | ||
/// Add entry to the attributes. | ||
/// </summary> | ||
/// <param name="key">Entry key.</param> | ||
/// <param name="value">Entry value.</param> | ||
public void Add(string key, bool value) | ||
{ | ||
this.PrivateAdd(key, value); | ||
} | ||
|
||
/// <summary> | ||
/// Add entry to the attributes. | ||
/// </summary> | ||
/// <param name="key">Entry key.</param> | ||
/// <param name="value">Entry value.</param> | ||
public void Add(string key, double value) | ||
{ | ||
this.PrivateAdd(key, value); | ||
} | ||
|
||
/// <summary> | ||
/// Add entry to the attributes. | ||
/// </summary> | ||
/// <param name="key">Entry key.</param> | ||
/// <param name="values">Entry value.</param> | ||
public void Add(string key, long[] values) | ||
{ | ||
this.PrivateAdd(key, values); | ||
} | ||
|
||
/// <summary> | ||
/// Add entry to the attributes. | ||
/// </summary> | ||
/// <param name="key">Entry key.</param> | ||
/// <param name="values">Entry value.</param> | ||
public void Add(string key, string[] values) | ||
{ | ||
this.PrivateAdd(key, values); | ||
} | ||
|
||
/// <summary> | ||
/// Add entry to the attributes. | ||
/// </summary> | ||
/// <param name="key">Entry key.</param> | ||
/// <param name="values">Entry value.</param> | ||
public void Add(string key, bool[] values) | ||
{ | ||
this.PrivateAdd(key, values); | ||
} | ||
|
||
/// <summary> | ||
/// Add entry to the attributes. | ||
/// </summary> | ||
/// <param name="key">Entry key.</param> | ||
/// <param name="values">Entry value.</param> | ||
public void Add(string key, double[] values) | ||
{ | ||
this.PrivateAdd(key, values); | ||
} | ||
|
||
private void PrivateAdd(string key, object value) | ||
{ | ||
if (key == null) | ||
{ | ||
throw new ArgumentNullException(key); | ||
} | ||
|
||
this.Attributes[key] = value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.