open-telemetry / open-telemetry/opentelemetry-cpp

Error while exporting Metrics

Open
#2,391 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hello team,

I'm trying to use Opentelemetry Cpp version 1.8.1 to export my metrics from Ubuntu 22.04 machine . The plugin code that creates the agents, the provider to export the metrics. When I try to create the metrics provider, I get an allocation error. I'm not sure what's causing this error.

terminate called after throwing an instance of '
std::bad_alloc'
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc  what():  std::bad_alloc

I did some analysis using gdbgui to detail the problem and found that when MetaDataValidator is called, it triggers this regex and allocator validation and fails.

image

It would be nice if anyone has some idea on it. I am stuck on this for a while any inputs would be welcome. Happy to provide more details if needed

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.

Research direction

Start by reproducing metrics provider creation with OpenTelemetry C++ 1.8.1 on Ubuntu 22.04. Inspect MetaDataValidator and the regex/allocation path under gdb, then narrow the failure to a minimal example. Done means the cause is identified and a reproducible report or validated fix is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
observability-sre
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.