-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: owent <[email protected]> Fix warning. Signed-off-by: owent <[email protected]> Fix warnings in maintainer mode and ETW exporter Signed-off-by: owent <[email protected]> Add CHANGELOG Signed-off-by: owent <[email protected]> Allow to move 'nostd::unique_ptr<T>' into `nostd::shared_ptr<T>` Signed-off-by: owent <[email protected]> Do not use `std/type_traits.h` any more. Maybe we should remove this file later. Signed-off-by: owent <[email protected]> Allow to add rvalue into `CircularBuffer` Signed-off-by: owent <[email protected]> Finish new `LogRecord` for exporters. Signed-off-by: owent <[email protected]> Finish unit tests in API and SDK. Exporters are still work in progress. Signed-off-by: owent <[email protected]> New `LogRecord` and `Recordable` implementations. Signed-off-by: WenTao Ou <[email protected]>
- Loading branch information
Showing
80 changed files
with
2,342 additions
and
1,575 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug on Windows", | ||
"type": "cppvsdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/build/<path-to-bin-file>", | ||
"args": [], | ||
"stopAtEntry": false, | ||
"cwd": "${workspaceFolder}", | ||
"environment": [], | ||
"externalConsole": false | ||
}, | ||
{ | ||
"name": "Debug on Linux", | ||
"type": "gdb", | ||
"request": "launch", | ||
"target": "${workspaceFolder}/bazel-bin/<path to the bin file>", | ||
"cwd": "${workspaceRoot}", | ||
"valuesFormatting": "parseText" | ||
} | ||
] | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug on Windows", | ||
"type": "cppvsdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/build/<path-to-bin-file>", | ||
"args": [], | ||
"stopAtEntry": false, | ||
"cwd": "${workspaceFolder}", | ||
"environment": [], | ||
"externalConsole": false | ||
}, | ||
{ | ||
"name": "Debug on Linux", | ||
"type": "gdb", | ||
"request": "launch", | ||
"target": "${workspaceFolder}/bazel-bin/<path to the bin file>", | ||
"cwd": "${workspaceRoot}", | ||
"valuesFormatting": "parseText" | ||
} | ||
] | ||
} |
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
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,81 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
#ifdef ENABLE_LOGS_PREVIEW | ||
|
||
# include "opentelemetry/common/attribute_value.h" | ||
# include "opentelemetry/common/key_value_iterable.h" | ||
# include "opentelemetry/common/timestamp.h" | ||
# include "opentelemetry/logs/severity.h" | ||
# include "opentelemetry/trace/span_id.h" | ||
# include "opentelemetry/trace/trace_flags.h" | ||
# include "opentelemetry/trace/trace_id.h" | ||
# include "opentelemetry/version.h" | ||
|
||
OPENTELEMETRY_BEGIN_NAMESPACE | ||
namespace logs | ||
{ | ||
/** | ||
* Maintains a representation of a log in a format that can be processed by a recorder. | ||
* | ||
* This class is thread-compatible. | ||
*/ | ||
class LogRecord | ||
{ | ||
public: | ||
virtual ~LogRecord() = default; | ||
|
||
/** | ||
* Set the timestamp for this log. | ||
* @param timestamp the timestamp to set | ||
*/ | ||
virtual void SetTimestamp(opentelemetry::common::SystemTimestamp timestamp) noexcept = 0; | ||
|
||
/** | ||
* Set the observed timestamp for this log. | ||
* @param timestamp the timestamp to set | ||
*/ | ||
virtual void SetObservedTimestamp(opentelemetry::common::SystemTimestamp timestamp) noexcept = 0; | ||
|
||
/** | ||
* Set the severity for this log. | ||
* @param severity the severity of the event | ||
*/ | ||
virtual void SetSeverity(opentelemetry::logs::Severity severity) noexcept = 0; | ||
|
||
/** | ||
* Set body field for this log. | ||
* @param message the body to set | ||
*/ | ||
virtual void SetBody(const opentelemetry::common::AttributeValue &message) noexcept = 0; | ||
|
||
/** | ||
* Set an attribute of a log. | ||
* @param key the name of the attribute | ||
* @param value the attribute value | ||
*/ | ||
virtual void SetAttribute(nostd::string_view key, | ||
const opentelemetry::common::AttributeValue &value) noexcept = 0; | ||
|
||
/** | ||
* Set the trace id for this log. | ||
* @param trace_id the trace id to set | ||
*/ | ||
virtual void SetTraceId(opentelemetry::trace::TraceId trace_id) noexcept = 0; | ||
|
||
/** | ||
* Set the span id for this log. | ||
* @param span_id the span id to set | ||
*/ | ||
virtual void SetSpanId(opentelemetry::trace::SpanId span_id) noexcept = 0; | ||
|
||
/** | ||
* Inject trace_flags for this log. | ||
* @param trace_flags the trace flags to set | ||
*/ | ||
virtual void SetTraceFlags(opentelemetry::trace::TraceFlags trace_flags) noexcept = 0; | ||
}; | ||
} // namespace logs | ||
OPENTELEMETRY_END_NAMESPACE | ||
#endif |
Oops, something went wrong.