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

[Tooling] Investigate the creation of a variadic function for the log labels #480

Open
8 tasks
Gustavobelfort opened this issue Jan 31, 2023 · 0 comments
Open
8 tasks
Labels
code health Nice to have code improvement tooling tooling to support development, testing et al

Comments

@Gustavobelfort
Copy link
Contributor

Gustavobelfort commented Jan 31, 2023

Objective

In telemetry/prometheus_module.go we have a variadic function that takes in any number of labels.

Investigate the opportunity to update the current SetFields function in the logging module to SetFieldsMap and have another SetFields function that accepts an even number of any parameters.

Origin Document

Screenshot 2023-01-30 at 7 11 42 PM

Goals

  • Make it easier to log a large number of variables in place w/ and w/o creating an inline map

Deliverable

  • Convert SetFields to SetFieldsMap
  • Introduce a new SetFields(...any) function that accepts an even number of parameter
  • Error checking (e.g. panic) to prevent accepting an odd number of labels as a valid value
  • Optionally update some logs using SetFieldsMap to use the new approach

Non-goals / Non-deliverables

  • Updating all existing logs in the codebase
  • Adding new logs

General issue deliverables

  • Update the appropriate CHANGELOG(s)
  • Update any relevant local/global README(s)

Testing Methodology

  • All tests: make test_all
  • LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md

Creator: @Gustavobelfort
Co-Owners: @Olshansk

@Gustavobelfort Gustavobelfort added the core starter task Good for newcomers, but aimed at core team members though still open for everyone label Jan 31, 2023
@Olshansk Olshansk added code health Nice to have code improvement tooling tooling to support development, testing et al labels Jan 31, 2023
@Olshansk Olshansk added priority:low and removed core starter task Good for newcomers, but aimed at core team members though still open for everyone labels Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health Nice to have code improvement tooling tooling to support development, testing et al
Projects
Status: Backlog
Development

No branches or pull requests

2 participants