receivers:
filelog/spdlog:
include:
- /home/robbluo/tmp/yrlog/*function_*.log
- /home/robbluo/tmp/yrlog/*libruntime*.log
- /home/robbluo/tmp/yrlog/*iam_server.log
- /home/robbluo/tmp/yrlog/job-*.log
- /home/robbluo/tmp/yrlog/runtime-*_runtime.log
exclude:
- /home/robbluo/tmp/yrlog/*_std.log
- /home/robbluo/tmp/yrlog/*.log.gz
start_at: end
multiline:
line_start_pattern: '^[DIWEC]\d{4} '
operators:
- type: regex_parser
regex: '^(?P<severity>[DIWEC])(?P<log_time>\d{4} \d{2}:\d{2}:\d{2}\.\d+) (?P<thread>\d+) (?P<source>[^\]]+)\] (?P<pid>\d+),[^\]]*\](?P<node>[^,]*),(?P<component>[^\]]*)\](?P<body>[\s\S]*)'
timestamp:
parse_from: attributes.log_time
layout_type: strptime
layout: '%m%d %H:%M:%S.%f'
location: Asia/Shanghai
severity:
parse_from: attributes.severity
mapping:
debug: D
info: I
warn: W
error: E
fatal: C
- type: add
field: resource["service.name"]
value: "yuanrong-functionsystem"
- type: move
from: attributes.node
to: resource["node.name"]
- type: move
from: attributes.component
to: resource["component.name"]
- type: move
from: attributes.source
to: attributes["code.filepath"]
- type: move
from: attributes.thread
to: attributes["thread.id"]
- type: move
from: attributes.pid
to: attributes["process.pid"]
- type: remove
field: attributes.log_time
filelog/datasystem:
include:
- /home/robbluo/tmp/yrlog/datasystem_worker.*.log
- /home/robbluo/tmp/yrlog/master/datasystem_worker.*.log
exclude:
- /home/robbluo/tmp/yrlog/**/*.log.gz
start_at: end
multiline:
line_start_pattern: '^\d{4}-\d{2}-\d{2}T'
operators:
- type: regex_parser
regex: '^(?P<timestamp>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+) \| (?P<severity>[DIWEC]) \| (?P<source>[^|]+?)\s*\| (?P<node>[^|]+?)\s*\| (?P<pid>\d+):(?P<thread>\d+)\s*\|[^|]*\|[^|]*\|\s*(?P<body>[\s\S]*)'
timestamp:
parse_from: attributes.timestamp
layout_type: strptime
layout: '%Y-%m-%dT%H:%M:%S.%f'
severity:
parse_from: attributes.severity
mapping:
debug: D
info: I
warn: W
error: E
- type: add
field: resource["service.name"]
value: "yuanrong-datasystem"
- type: move
from: attributes.node
to: resource["node.name"]
- type: move
from: attributes.source
to: attributes["code.filepath"]
- type: move
from: attributes.thread
to: attributes["thread.id"]
- type: move
from: attributes.pid
to: attributes["process.pid"]
- type: remove
field: attributes.timestamp
filelog/faasfrontend:
include:
- /home/robbluo/tmp/yrlog/faasfrontend.*.log
exclude:
- /home/robbluo/tmp/yrlog/*.log.gz
start_at: end
multiline:
line_start_pattern: '^\d{4}-\d{2}-\d{2} \d{2}:'
operators:
- type: regex_parser
regex: '^(?P<timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+) \| (?P<severity>\w+) \| (?P<source>[^|]+?)\s*\| (?P<process>[^|]+?)\s*\|[^|]*\|[^|]*\|\s*(?P<body>[\s\S]*)'
timestamp:
parse_from: attributes.timestamp
layout_type: strptime
layout: '%Y-%m-%d %H:%M:%S.%f'
severity:
parse_from: attributes.severity
mapping:
debug: DEBUG
info: INFO
warn: WARN
error: ERROR
- type: add
field: resource["service.name"]
value: "yuanrong-faasfrontend"
- type: move
from: attributes.process
to: resource["process.name"]
- type: move
from: attributes.source
to: attributes["code.filepath"]
- type: remove
field: attributes.timestamp
filelog/faasscheduler:
include:
- /home/robbluo/tmp/yrlog/faasscheduler.*.log
exclude:
- /home/robbluo/tmp/yrlog/*.log.gz
start_at: end
multiline:
line_start_pattern: '^\d{4}-\d{2}-\d{2} \d{2}:'
operators:
- type: regex_parser
regex: '^(?P<timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+) \| (?P<severity>\w+) \| (?P<source>[^|]+?)\s*\| (?P<process>[^|]+?)\s*\|[^|]*\|[^|]*\|\s*(?P<body>[\s\S]*)'
timestamp:
parse_from: attributes.timestamp
layout_type: strptime
layout: '%Y-%m-%d %H:%M:%S.%f'
severity:
parse_from: attributes.severity
mapping:
debug: DEBUG
info: INFO
warn: WARN
error: ERROR
- type: add
field: resource["service.name"]
value: "yuanrong-faasscheduler"
- type: move
from: attributes.process
to: resource["process.name"]
- type: move
from: attributes.source
to: attributes["code.filepath"]
- type: remove
field: attributes.timestamp
filelog/metaservice:
include:
- /home/robbluo/tmp/yrlog/meta-service-run.*.log
exclude:
- /home/robbluo/tmp/yrlog/*.log.gz
start_at: end
multiline:
line_start_pattern: '^\[\d{4}-\d{2}-\d{2}'
operators:
- type: regex_parser
regex: '^\[(?P<timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+) (?P<severity>\w+) (?P<source>[^\]]+)\] \[(?P<node>[^\]]*)\] (?P<body>[\s\S]*)'
timestamp:
parse_from: attributes.timestamp
layout_type: strptime
layout: '%Y-%m-%d %H:%M:%S.%f'
severity:
parse_from: attributes.severity
mapping:
debug: DEBUG
info: INFO
warn: WARN
error: ERROR
- type: add
field: resource["service.name"]
value: "yuanrong-metaservice"
- type: move
from: attributes.node
to: resource["node.name"]
- type: move
from: attributes.source
to: attributes["code.filepath"]
- type: remove
field: attributes.timestamp
filelog/stdlogs:
include:
- /home/robbluo/tmp/yrlog/*_std.log
- /home/robbluo/tmp/yrlog/*.out
exclude:
- /home/robbluo/tmp/yrlog/*.log.gz
start_at: end
operators:
- type: add
field: resource["service.name"]
value: "yuanrong-stdlogs"
- type: move
from: attributes["log.file.name"]
to: resource["log.file.name"]
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
batch:
timeout: 5s
send_batch_size: 1000
memory_limiter:
limit_mib: 1536
spike_limit_mib: 512
check_interval: 5s
resource:
attributes:
- key: akernel_env
value: test
action: upsert
exporters:
otlp_http/loki:
endpoint: http://loki:3100/otlp
tls:
insecure: true
otlp_grpc/tempo:
endpoint: tempo:4317
tls:
insecure: true
prometheusremotewrite:
endpoint: http://prometheus:9090/api/v1/write
tls:
insecure: true
resource_to_telemetry_conversion:
enabled: true
prometheus:
endpoint: "0.0.0.0:8889"
resource_to_telemetry_conversion:
enabled: true
debug:
verbosity: basic
service:
telemetry:
logs:
level: info
metrics:
level: detailed
readers:
- pull:
exporter:
prometheus:
host: "0.0.0.0"
port: 8888
pipelines:
logs:
receivers: [filelog/spdlog, filelog/datasystem, filelog/faasfrontend, filelog/faasscheduler, filelog/metaservice, filelog/stdlogs]
processors: [memory_limiter, resource, batch]
exporters: [otlp_http/loki, debug]
traces:
receivers: [otlp]
processors: [memory_limiter, resource, batch]
exporters: [otlp_grpc/tempo, debug]
metrics:
receivers: [otlp]
processors: [memory_limiter, resource, batch]
exporters: [prometheusremotewrite, debug, prometheus]