palantir / palantir/tracing-java

Creating a new trace should always open a new span

Open
#33 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
28
Forks
20
Avg merge
1d 8h
Merged PRs (30d)
15

Description

It should not be possible to create a new trace without also creating a root span. The current API allows for an undefined gap between creating a trace, and opening a span. In this gap, a traceId is set on the thread (and logged messages) without occurring inside of an observed operation.

Contributor guide

No contributing guide indexed for this repository

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 with the current trace-creation API and the span-opening API, then inspect how the traceId is placed on the thread and used by logging. Done means creating a new trace also creates its root span, with no observable gap where a traceId exists outside an observed operation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.