-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
102 lines (98 loc) · 3.14 KB
/
config.yml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
extensions:
oauth2client:
client_id: "${env:OIDC_CLIENT_ID}"
client_secret: "${env:OIDC_CLIENT_SECRET}"
token_url: "${env:OIDC_TOKEN_URL}"
scopes: [ "observability" ]
timeout: 10s
receivers:
otlp:
protocols:
http:
endpoint: localhost:4318
grpc:
endpoint: localhost:4317
# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/prometheusreceiver
prometheus:
config:
scrape_configs:
- job_name: 'litestream'
scrape_interval: 60s
static_configs:
- targets: [ '0.0.0.0:9090' ]
# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver
filelog:
include: [ /opt/homebrew/Cellar/voripos-txn-sync/**/var/log/voripos-txn-sync.log ]
include_file_path: true
operators:
- type: json_parser
id: timestamp_parser
timestamp:
parse_from: attributes.time
# NOTE: We use gotime because striptime cannot handle the colon in the timezone offset:
# Example: 2023-12-21T08:16:11.890832-08:00
layout_type: gotime
layout: '2006-01-02T15:04:05.999999-07:00'
severity:
parse_from: attributes.level
attributes:
'service.name': litestream
processors:
batch:
attributes:
actions:
- key: device.serial_number
value: "${env:DEVICE_SERIAL_NUMBER}"
action: insert
- key: voripos.otel_collector_version
value: "${env:VORIPOS_OTEL_COLLECTOR_VERSION}"
action: upsert
- key: voripos.environment
value: "${env:VORIPOS_ENVIRONMENT}"
action: upsert
- key: voripos.banner.id
value: "${env:VORIPOS_BANNER_ID}"
action: upsert
- key: voripos.banner.name
value: "${env:VORIPOS_BANNER_NAME}"
action: upsert
- key: voripos.store.id
value: "${env:VORIPOS_STORE_ID}"
action: upsert
- key: voripos.store.name
value: "${env:VORIPOS_STORE_NAME}"
action: upsert
- key: voripos.lane.id
value: "${env:VORIPOS_LANE_ID}"
action: upsert
- key: voripos.lane.name
value: "${env:VORIPOS_LANE_NAME}"
action: upsert
memory_limiter:
check_interval: 5s
limit_mib: 500
spike_limit_mib: 200
exporters:
debug:
verbosity: detailed
otlphttp:
endpoint: "https://otel-http.vori.com"
auth:
authenticator: oauth2client
headers:
User-Agent: "voripos-otel-collector/${env:VORIPOS_OTEL_COLLECTOR_VERSION} (voripos; banner_id:${env:VORIPOS_BANNER_ID} store_id:${env:VORIPOS_STORE_ID} lane_id:${env:VORIPOS_LANE_ID}) ${env:VORIPOS_BANNER_NAME}, ${env:VORIPOS_STORE_NAME}, ${env:VORIPOS_LANE_NAME}"
service:
extensions: [oauth2client]
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter,attributes,batch]
exporters: [debug, otlphttp]
metrics:
receivers: [otlp,prometheus]
processors: [memory_limiter,attributes,batch]
exporters: [debug, otlphttp]
logs:
receivers: [otlp,filelog]
processors: [memory_limiter,attributes,batch]
exporters: [debug, otlphttp]