open-telemetry / open-telemetry/opentelemetry-cpp

provide a little more information before calling std::terminate

Open
#2,630 3 comments 0 reactions 1 assignee View on GitHub

@marcalff is already working on this.

Since Apr 8, 2024.

Stale triage/unresolved
Dominant language
C++
Stars
1.4k
Forks
632
Avg merge
1d 13h
Merged PRs (30d)
75

Description

I've incorporated OpenTelemetry into my program and on certain execution paths, especially on Linux, I get terminate called without an active exception or similar kinds of messages.

If I take out my OpenTelemetry initialization/cleanup functions and leave the null Otel spans and logs in there, nothing crashes. I have exception handlers defined, but there are a few cases where a raw std::terminate is called from the library.

For example: https://github.com/open-telemetry/opentelemetry-cpp/blob/848db5722e024371f41ebdecf97f70191efd2c16/api/include/opentelemetry/nostd/span.h#L103

I have no idea if this is the bug or not, but it makes it harder. I would expect a library to log something if it's going to call terminate.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.