-
Notifications
You must be signed in to change notification settings - Fork 857
Exporting tags consistently #3281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cijothomas
merged 36 commits into
open-telemetry:main
from
alanwest:alanwest/tag-transformer
May 27, 2022
Merged
Changes from 25 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
3d44019
WIP generalize transforming tags
alanwest 5c17ba1
Merge branch 'main' into alanwest/tag-transformer
alanwest 6653468
Make abstract methods protected
alanwest bd59744
Add ZipkinTagTransformer
alanwest 84a1ee7
Simplify ZipkinTagTransformer
alanwest 9cbb855
Refactor OTLP array attribute transform
alanwest fc5bf81
Merge branch 'main' into alanwest/tag-transformer
alanwest 0c92519
Merge branch 'main' into alanwest/tag-transformer
alanwest 493ed24
Unused using
alanwest 0ad99fe
Change Zipkin test. Array values are now represented as JSON arrays.
alanwest e8a52a4
net462 and netcoreapp3.1 runtimes are confused about pointer types
alanwest 643742e
Handle array values better
alanwest 347ab44
Fix namespace
alanwest 181e2fa
Handle exceptions when transforming array values
alanwest a2c2d69
Log when transform fails
alanwest 9d9c5d0
Merge branch 'main' into alanwest/tag-transformer
alanwest 38d17a7
TransformTag -> TryTransformTag
alanwest 1f09f2c
CodeAnalysis recommendations
alanwest bdd17b2
Change OTLP exporter to use TryTransformTag
alanwest f3ee3e7
CodeAnalysis
alanwest c3dd4ec
CodeAnalysis
alanwest 76a2f3c
Change Jaeger exporter to use TryTransformTag
alanwest 38fb5f0
Make TagTransformers singletons
alanwest 4b7727c
Merge branch 'main' into alanwest/tag-transformer
alanwest efc21a4
Unused using
alanwest a536bf0
else if
alanwest b6cab43
Make singleton Instance a property
alanwest 5b23656
:seal: classes
alanwest 040762c
Debug.Assert
alanwest fd9f373
Do later
alanwest 0d31699
Make TransformValue protected
alanwest 673ade0
Exclude TagTransformer.cs from compilation of SDK project
alanwest 74df0df
Move JSON serialization to projects that need it
alanwest d882145
File-scoped namespaces
alanwest 4f89b27
Merge branch 'main' into alanwest/tag-transformer
cijothomas 5fa4281
Update changelogs
alanwest File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
49 changes: 49 additions & 0 deletions
49
src/OpenTelemetry.Exporter.Jaeger/Implementation/JaegerTagTransformer.cs
This file contains hidden or 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,49 @@ | ||
| // <copyright file="JaegerTagTransformer.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 OpenTelemetry.Internal; | ||
|
|
||
| namespace OpenTelemetry.Exporter.Jaeger.Implementation | ||
| { | ||
| internal class JaegerTagTransformer : TagTransformer<JaegerTag> | ||
| { | ||
| public static JaegerTagTransformer Instance = new(); | ||
alanwest marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| private JaegerTagTransformer() | ||
| { | ||
| } | ||
|
|
||
| protected override JaegerTag TransformIntegralTag(string key, long value) | ||
| { | ||
| return new JaegerTag(key, JaegerTagType.LONG, vLong: value); | ||
| } | ||
|
|
||
| protected override JaegerTag TransformFloatingPointTag(string key, double value) | ||
| { | ||
| return new JaegerTag(key, JaegerTagType.DOUBLE, vDouble: value); | ||
| } | ||
|
|
||
| protected override JaegerTag TransformBooleanTag(string key, bool value) | ||
| { | ||
| return new JaegerTag(key, JaegerTagType.BOOL, vBool: value); | ||
| } | ||
|
|
||
| protected override JaegerTag TransformStringTag(string key, string value) | ||
| { | ||
| return new JaegerTag(key, JaegerTagType.STRING, vStr: value); | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.