Skip to content

[BUG] Cannot pass LogExtra to Logger in Typescript #2673

@JJCLane

Description

@JJCLane

Describe the issue
When attempting to log using the ctx.logger and passing a value into the extra argument, it fails to log the value and shows this warning in the worker:

ctx.logger.error(`Failure response`, { extra: 'test' });
[WARN/Dispatcher] Could not put log: /EventsService/PutLog INVALID_ARGUMENT: Invalid metadata JSON: json: cannot unmarshal string into Go value of type map[string]interface {} undefined

Based on the warning I attempted to pass in an object instead, which removed the warning but still logs undefined.

ctx.logger.error(`Failure response`, { extra: {'test': 'test' } });
[ERROR/ctx] Failure response undefined

Environment

  • SDK: TypeScript v1.10.3
  • Engine: Self-hosted ghcr.io/hatchet-dev/hatchet/hatchet-lite:latest

Expected behavior
The extra data passed would be logged and visible in the dashboard.

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