Repository navigation
Expand file tree
/
Copy pathtrpc_python.yaml
More file actions
57 lines (53 loc) · 2.87 KB
/
Copy pathtrpc_python.yaml
File metadata and controls
57 lines (53 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Tencent is pleased to support the open source community by making tRPC-Metrics-Runtime available.
#
# Copyright (C) 2026 Tencent. All rights reserved.
#
# tRPC-Metrics-Runtime is licensed under Apache-2.0.
global: # Global configuration.
namespace: Development # Environment type: production or development.
env_name: test # Environment name used when namespace is not production.
server: # Server configuration.
app: test # Application name.
server: Greeter # Process service name.
bin_path: /usr/local/trpc/bin/ # Directory of the binary and framework config.
conf_path: /usr/local/trpc/conf/ # Directory of business config files.
data_path: /usr/local/trpc/data/ # Directory of business data files.
#mode: multi-listener
# In merge mode each process listens on the same ip and port with SO_REUSEADDR.
service: # Services exposed by this process. More than one is allowed.
- name: trpc.trpc_python_group.helloworld.Greeter # Service route name.
ip: 127.0.0.1 # Listen address. ${ip} is allowed. ip wins over nic when both are set.
port: 8000 # Listen port. ${port} is allowed.
network: tcp # Transport: tcp or udp.
protocol: trpc # Application protocol: trpc or http.
timeout: 5000 # Maximum request handling time, in milliseconds.
disable_request_timeout: true # Ignore the timeout inherited from the caller.
client: # Backends this process calls.
timeout: 1000 # Default maximum handling time for every backend.
namespace: Development # Default environment for every backend.
service: # Per-backend settings.
- name: trpc.test.helloworld.Greeter # Backend service name.
network: tcp # Backend transport: tcp or udp. This value wins over the default.
protocol: trpc # Application protocol: trpc or http.
timeout: 800 # Maximum request handling time.
plugins: # Plugin configuration.
log: # Logging configuration.
default: # Default logger. More than one writer is allowed.
- writer: console # Console writer. This is the default.
level: debug # Console log level.
format_config:
# Timestamps include milliseconds.
fmt: "[%(asctime)s.%(msecs)03d][%(levelname)s][%(filename)s:%(lineno)s][%(process)d][%(message)s]"
time_fmt: "%Y-%m-%d %H:%M:%S"
- writer: file # Local file writer.
level: info # Rolling file log level.
formatter: json # Log format.
writer_config:
filename: ./hello.log # Path of the rolling log file.
max_size: 10 # Maximum size of one log file, in MB.
max_backups: 10 # Maximum number of retained log files.
max_age: 7 # Maximum age of a retained log file, in days.
compress: false # Whether retained log files are compressed.
format_config:
fmt: "[%(asctime)s][%(levelname)s][%(filename)s:%(lineno)s][%(process)d][%(message)s]"
time_fmt: "%Y-%m-%d %H:%M:%S"