Skip to content

Instantly share code, notes, and snippets.

@yashrsharma44
Last active December 7, 2020 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yashrsharma44/d7db9121f59c0d3b54f3c42f485abf6a to your computer and use it in GitHub Desktop.
Save yashrsharma44/d7db9121f59c0d3b54f3c42f485abf6a to your computer and use it in GitHub Desktop.
Dummy description of a yaml config file for request logging
request_logging:
- http:
- config:
- path: # regexp “*” e.g /api/v1/query_range or /metrics
port: # int
- path: # regexp “*” e.g /api/v1/query_range or /metrics
port: # int
- options: # We configure the options for this indvidual path
- level: # INFO / DEBUG / WARN / ERROR -> means what messages with certain log level will be printed.
decision:
- log_start: # TRUE / FALSE
log_end: # TRUE / FALSE
- grpc:
- config:
- service: # regexp gRPC service name: thanos.Store
method: # regexp gRPC method name: Series
- service: # regexp gRPC service name: thanos.Store
method: # regexp gRPC method name: Info
# We configure the options for all the above services
- options:
- level: # INFO / DEBUG / WARN / ERROR -> means what messages with certain log level will be printed.
decision:
- log_start: # TRUE / FALSE
log_end: # TRUE / FALSE
# Here the options can be configured at the individual targets(methods/service), or at the global level(for http/grpc),
# or for all grpc and http methods/services.
# The individual options override the global configurations
# For global configs, this would also work
request_logging:
- http:
- config:
- path: # regexp “*” e.g /api/v1/query_range or /metrics
port: # int
- grpc:
- config:
- service: # regexp gRPC service name: thanos.Store
method: # regexp gRPC method name: Series
# The options apply for all the path/services above including grpc and http
- options:
- level: # INFO / DEBUG / WARN / ERROR -> means what messages with certain log level will be printed.
decision:
- log_start: # TRUE / FALSE
log_end: # TRUE / FALSE
# By default, the request logging is switched off, so please configure this file for enabling request logging
@bwplotka
Copy link

bwplotka commented Dec 3, 2020

request_logging:
  - http:
    - path: # regexp “*”  e.g /api/v1/query_range or /metrics
      port: # int
    grpc:
    - service: # regexp gRPC service name: thanos.Store
      method: # regexp gRPC method name: Series
   - service: # regexp gRPC service name: thanos.Store
      method: # regexp gRPC method name: Info
    level: # INFO / DEBUG / WARN / ERROR -> means what messages with certain log level will be printed.  
    decision:
    - log_start: # TRUE / FALSE
    - log_end:  # TRUE / FALSE

@yashrsharma44
Copy link
Author

Cool, let me write up the new YAML format, and get it started!

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