-
Notifications
You must be signed in to change notification settings - Fork 579
[SDK] LogRecord attribute limits enforcement #4157
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
Open
thc1006
wants to merge
17
commits into
open-telemetry:main
Choose a base branch
from
thc1006:feat/log-record-limits-4126
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,255
−65
Open
Changes from 2 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e244122
[SDK] LogRecord attribute limits enforcement
thc1006 1612edc
[SDK] LogRecord limits: address review (store by value, OTLP UTF-8-aw…
thc1006 c4532cd
[SDK] LogRecord limits: address dbarker review (extract utilities, de…
thc1006 3144991
[SDK] LogRecord limits: fix noexcept correctness + restore Bazel link
thc1006 ccdd5e9
Merge branch 'main' into feat/log-record-limits-4126
dbarker 8c965e7
[SDK] LogRecord limits: fix MSVC variable shadow + drop dead includes…
thc1006 5588f2c
Merge branch 'main' into feat/log-record-limits-4126
dbarker cd413f8
[SDK] LogRecord limits: address dbarker v3 review (truncate during co…
thc1006 6c68257
Merge branch 'main' into feat/log-record-limits-4126
ThomsonTan 3e32fd7
[SDK] LogRecord limits: gate SetLogRecordLimits on processor capability
thc1006 0977ddd
[SDK] LogRecord limits: UTF-8-safe truncation in AttributeConverter
thc1006 3be2379
[SDK] LogRecord limits: satisfy the clang-tidy warning limit
thc1006 622d670
[SDK] LogRecord limits: default recordable to no limits, inject via p…
thc1006 9627722
Merge branch 'main' into feat/log-record-limits-4126
dbarker 980ef8e
[SDK] LogRecord limits: address dbarker review (comments, UTF-8 scan …
thc1006 0ac2cf3
Merge branch 'main' into feat/log-record-limits-4126
dbarker 378442f
[SDK] LogRecord limits: drop vtable implementation-detail comment
thc1006 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| // Copyright The OpenTelemetry Authors | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <cstddef> | ||
| #include <limits> | ||
|
|
||
| #include "opentelemetry/version.h" | ||
|
|
||
| OPENTELEMETRY_BEGIN_NAMESPACE | ||
| namespace sdk | ||
| { | ||
| namespace logs | ||
| { | ||
|
|
||
| /** | ||
| * LogRecordLimits carries the SDK-level attribute limits applied to every | ||
| * LogRecord emitted through a LoggerProvider. The defaults match the | ||
| * specification: at most 128 attributes per record, attribute value length | ||
| * unlimited (no truncation). | ||
| * | ||
| * See https://opentelemetry.io/docs/specs/otel/logs/sdk/#logrecord-limits. | ||
| */ | ||
| struct LogRecordLimits | ||
| { | ||
| static constexpr std::size_t kDefaultAttributeCountLimit = 128; | ||
| static constexpr std::size_t kDefaultAttributeValueLengthLimit = | ||
| (std::numeric_limits<std::size_t>::max)(); | ||
|
|
||
| std::size_t attribute_count_limit = kDefaultAttributeCountLimit; | ||
| std::size_t attribute_value_length_limit = kDefaultAttributeValueLengthLimit; | ||
| }; | ||
|
|
||
| } // namespace logs | ||
| } // namespace sdk | ||
| OPENTELEMETRY_END_NAMESPACE |
Oops, something went wrong.
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.