-
Notifications
You must be signed in to change notification settings - Fork 512
Closed
Labels
bugSomething isn't workingSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Description
Describe your environment v1.14.2
Steps to reproduce
#include "opentelemetry/logs/provider.h"
int main(int argc, char* argv[]) {
auto logs_provider = opentelemetry::v1::logs::Provider::GetLoggerProvider();
auto logger = logs_provider->GetLogger("test");
auto sample = logger->CreateLogRecord();
sample->SetAttribute("some key", "some value");
logger->EmitLogRecord(std::move(sample));
return 0;
}
What is the expected behavior?
Program should run successfully.
What is the actual behavior?
SEGV at sample->SetAttribute because sample is null.
Additional context
| nostd::unique_ptr<LogRecord> CreateLogRecord() noexcept override { return nullptr; } |
The NoopLogger is supposed to return usable objects, not a nullptr.
tooji
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.