open-telemetry / open-telemetry/opentelemetry-cpp

Unicode logs/attributes support

Open
#2,636 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi!
In most cases simple string_view or const char * is sufficient for needs of our project. But I wonder if there are some plans to extend logs/attributes with unicode support (Neither Logger functions nor AttributeValue seems to support wchar_t)?

Is your feature request related to a problem?
We are using logs/metrics (+traces in the future) quite extensively and recently a question was risen whether we can have at least unicode attributes (for example somebody wants to extend his log message with an attribute that represents some company name, which cannot be represented by ascii characters (chinese for example)).

Describe the solution you'd like
Would be nice to have a possibility to log messages and/or add attributes that can represent wider range of characters

Describe alternatives you've considered
One of alternatives I was thinking about is to have a possibility to send an array of bytes and corresponding encoding so that consumer knows how to interpret those bytes.

Additional context
Add any other context about the feature request here.

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 examining the Logger functions and AttributeValue mentioned in the issue to understand their current character and byte assumptions. Research how unicode messages and attributes should be represented, including the proposed byte-array and encoding alternative; the work is complete only when a supported approach and its expected consumer behavior are defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.