-
Notifications
You must be signed in to change notification settings - Fork 854
[otlp] Add log exception attributes under feature flag #4892
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
CodeBlanch
merged 21 commits into
open-telemetry:main
from
vishweshbankwar:vibankwa/reintroduce-exception-attributes
Oct 3, 2023
Merged
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
106be5a
Add log exception attributes under feature flag
f4e1b83
nullable
001027b
fix build
aabf44d
address feedback
1e2f552
changelog
7d284d6
Merge branch 'main' into vibankwa/reintroduce-exception-attributes
vishweshbankwar 982891f
refactor
fc2cfe2
update readme
98530ee
fix md
f32d098
Merge branch 'main' into vibankwa/reintroduce-exception-attributes
vishweshbankwar 559fa87
address feedback
81fb7e5
Merge branch 'vibankwa/reintroduce-exception-attributes' of https://g…
e219db6
Merge branch 'main' into vibankwa/reintroduce-exception-attributes
vishweshbankwar e0df512
Merge branch 'main' into vibankwa/reintroduce-exception-attributes
cijothomas 21f188b
pr feedback
ac83adf
Merge branch 'main' into vibankwa/reintroduce-exception-attributes
vishweshbankwar 2413e1d
fix build
d73f493
file header
c7b6f91
Merge branch 'main' into vibankwa/reintroduce-exception-attributes
vishweshbankwar ab4cb52
fix name
d17aa23
fix changelog sequence
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
45 changes: 45 additions & 0 deletions
45
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ExperimentalFeatures.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,45 @@ | ||
| // <copyright file="ExperimentalFeatures.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> | ||
|
|
||
| #nullable enable | ||
|
|
||
| using Microsoft.Extensions.Configuration; | ||
| using OpenTelemetry.Internal; | ||
|
|
||
| namespace OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation; | ||
|
|
||
| internal sealed class ExperimentalFeatures | ||
| { | ||
| public const string EMITLOGEXCEPTIONATTRIBUTES = "OTEL_DOTNET_EMIT_EXCEPTION_LOG_ATTRIBUTES"; | ||
vishweshbankwar marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| public ExperimentalFeatures() | ||
| : this(new ConfigurationBuilder().AddEnvironmentVariables().Build()) | ||
| { | ||
| } | ||
|
|
||
| public ExperimentalFeatures(IConfiguration configuration) | ||
| { | ||
| if (configuration.TryGetBoolValue(EMITLOGEXCEPTIONATTRIBUTES, out var emitLogExceptionAttributes)) | ||
| { | ||
| this.EmitLogExceptionAttributes = emitLogExceptionAttributes; | ||
| } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets a value indicating whether log exception attributes should be exported. | ||
| /// </summary> | ||
| public bool EmitLogExceptionAttributes { get; set; } = false; | ||
| } | ||
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.