st-json/1: additive structured members so the OTel mapping needs no string parsing · Issue #268 · stacktale/stacktale · GitHub
Skip to content

st-json/1: additive structured members so the OTel mapping needs no string parsing #268

Open

Description

@GabrielBBaldez

Mapping st-json/1 to OpenTelemetry (#136) leaves three rows lossy. In each, a consumer has to parse a display string:

  1. error.type is the simple class name (NullPointerException). semconv exception.type wants the fully-qualified name.
  2. error.culprit.frame is a display string, e.g. OrderService.confirm(OrderService.java:87). Getting code.function.name / code.line.number out of it means parsing.
  3. env is one string (app=shop-api 1.4.2 (git 7e3c1f) | java 21 | profile=dev | linux). service.name, service.version and deployment.environment.name have to be split out of it.

Proposal, additive only (FORMAT.md §6, so no format bump; the schema is open and the new members are optional):

  • error.typeName (FQN), next to error.type.
  • error.culprit.className / methodName / fileName / lineNumber, using the same names as the repro.* members.
  • envInfo: {app, version, gitSha, profile, java, os}, next to env.

Cost: JsonReportRenderer, the schema, the goldens, the drift test, and the §7 example. st/1 text is unchanged. Existing members are not renamed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions