forked from open-telemetry/opentelemetry-cpp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
EmitEvent
to follow open-telemetry/opentelemetry-specificati…
…on#2941 Signed-off-by: owent <[email protected]> Fix `-Werror=suggest-override` and style Signed-off-by: owent <[email protected]> Fix ostream_log_test Signed-off-by: owent <[email protected]> Fix ostream print_value for `AttributeValue` Signed-off-by: owent <[email protected]> New Recordable of logs Signed-off-by: owent <[email protected]> Restore .vscode/launch.json 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
77 changed files
with
2,206 additions
and
1,374 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(const 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(const opentelemetry::trace::SpanId &span_id) noexcept = 0; | ||
|
||
/** | ||
* Inject trace_flags for this log. | ||
* @param trace_flags the trace flags to set | ||
*/ | ||
virtual void SetTraceFlags(const opentelemetry::trace::TraceFlags &trace_flags) noexcept = 0; | ||
}; | ||
} // namespace logs | ||
OPENTELEMETRY_END_NAMESPACE | ||
#endif |
Oops, something went wrong.