open-telemetry / open-telemetry/opentelemetry-java

Better declarative config error messages

Open
#7,949 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request
Dominant language
Java
Stars
2.5k
Forks
1k
Avg merge
3d 17h
Merged PRs (30d)
58

Description

When an error occurs in declarative config, the error message should tell you the location in the document where the error occurred.

Currently, we only give generic errors of the form "batch span processor exporter is required but is null". These messages can be ambiguous since its possible to have multiple processors. Even when unambiguous, they're more difficult to parse and fix than something that includes document context like: .tracer_provider.processors[0].batch exporter is required but is null.

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

Locate the declarative config validation path that produces the generic error about a null batch span processor exporter, then inspect how document locations are represented during validation. Done means errors include the relevant document path, such as .tracer_provider.processors[0].batch, while retaining the existing validation context.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.