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

Extract common metrics and logging #620

Merged
merged 59 commits into from
Jul 9, 2024
Merged

Conversation

noise64
Copy link
Contributor

@noise64 noise64 commented Jun 26, 2024

Part of #173

Done:

  • extracted common grpc tracing and metrics from worker-executor to golem-common
  • added grpc tracing and metrics to worker service
  • switch to structured logging in
    • golem-common
    • worker-service (except openapi)
  • added spans to golem-common retry and worker-service call_executor
  • extracted common log and config handling
    • logging now can be configured for stdout and file output separately
    • added config loader:
      • configs now derived from the config struct defaults; added missing defaults and aligned them with the current toml local defaults
      • added common command line options to dump the default (and custom examples for covering enum config cases) and the loaded configs as toml or env vars
      • to avoid drifting code defaults and toml values (and to cleanup obsolete ones) added cargo make command to generate configs and sample env vars
  • added a new json formatter to flatten spans in logs:
    • spans are merged into the main message json object with the span name
    • in case of repeated spans only the last span is included
  • logging env var handling is extracted to common place for the local test env lib and now tracing env vars are passed through to the local golem services (e.g. one can enable json logging to files while running integ tests)

Todo in folllow up PR:

  • use structured logs everywhere
  • use grpc tracing everywhere
  • add OpenAPI tracing like we have for grpc

noise64 added 30 commits June 26, 2024 10:48
…s-and-logging

# Conflicts:
#	Cargo.lock
#	golem-common/Cargo.toml
#	golem-worker-service-base/src/app_config.rs
#	golem-worker-service/src/grpcapi/api_definition.rs
#	golem-worker-service/src/main.rs
…on-service + common config and tracing fixes
Makefile.toml Show resolved Hide resolved
@vigoo
Copy link
Contributor

vigoo commented Jul 5, 2024

I like the changes! :)

@noise64 noise64 marked this pull request as ready for review July 8, 2024 07:20
@vigoo vigoo merged commit d2041a0 into main Jul 9, 2024
14 checks passed
@vigoo vigoo deleted the extract-common-metrics-and-logging branch July 9, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants