Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging issues in custom log attributes and Pino log settings #1017

Closed
4 tasks done
gurjotkaur20 opened this issue Apr 10, 2024 · 0 comments · Fixed by #1019
Closed
4 tasks done

Logging issues in custom log attributes and Pino log settings #1017

gurjotkaur20 opened this issue Apr 10, 2024 · 0 comments · Fixed by #1019
Assignees
Labels
bad ux Providing information that is not clear or causing confusion for the user. bug Something isn't working P0 Highest priority

Comments

@gurjotkaur20
Copy link
Contributor

gurjotkaur20 commented Apr 10, 2024

Version Information

Server Version:
@godspeedsystems/core: 2.5.1

Current Behavior

Pino log setting is not working:

  • hostname is not displayed in Pino logs when it is true in log.bindings in config/default.yaml
lang: js
log:
  level: debug #by default info
  timestamp: stdTimeFunctions.isoTime #Pino date formats
  bindings: # should pid and hostname be enabled in pino log bindings.
    pid: false
    hostname: true 

image

Custom log attribute feature is not working in the below cases:

"http.get./helloworld":
  fn: helloworld
  authn: false
  # v2 format is working
  log:
    attributes:
      event_type: helloworld
  # v1 compatible format is not working
  # log_attributes:
  #   event_type: helloworld
  • Custom on_error logging in workflow/tasks: Check documentation here v2 compatible format is not working while backward compatibility is working. For example,
id: helloworld
tasks:
  - id: first_task
    fn: com.gs.return
    args:
      success: false
    on_error:
      # backward compatible is working
      log_attributes:
        error_type: "enter your custom error type here"
        error_message: "xyz value is required"
      # v2 compatible is not working
      # log:
      #   attributes:
      #     error_type: "enter your custom error type here"
      #     error_message: "xyz value is required"
  • At eventsource level: should be working. For example,
type: express
port: 3005
base_url: /api/v1 #the base url of the http service

#Basic swagger setup
docs:
  endpoint: /api-docs # the url on which the service will start

request_body_limit: 20000 # maximum size of the request body (in bytes)
file_size_limit: 50000 # How big a file can be uploaded (in bytes)

# not working
log:
  attributes:
    event_type: helloworld    

Expected Behavior

The above scenarios should work properly.

@gurjotkaur20 gurjotkaur20 added bug Something isn't working bad ux Providing information that is not clear or causing confusion for the user. P0 Highest priority labels Apr 10, 2024
@gurjotkaur20 gurjotkaur20 self-assigned this Apr 11, 2024
@gurjotkaur20 gurjotkaur20 linked a pull request Apr 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bad ux Providing information that is not clear or causing confusion for the user. bug Something isn't working P0 Highest priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants