-
Notifications
You must be signed in to change notification settings - Fork 0
/
otel-config.yaml
105 lines (91 loc) · 3.22 KB
/
otel-config.yaml
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
103
104
105
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
receivers:
otlp:
protocols:
grpc:
http:
# This section shows a sample pubsub receiver config. Uncomment it to
# use your own. See https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/googlecloudpubsubreceiver#google-pubsub-receiver
# googlecloudpubsub:
# project: my-project
# subscription: projects/my-project/subscriptions/otel
# encoding: raw_json
# This section shows a sample cloud spanner receiver config. Uncomment it to
# use your own. See https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/googlecloudspannerreceiver#google-cloud-spanner-receiver
# googlecloudspanner:
# collection_interval: 120s
# top_metrics_query_max_rows: 10
# backfill_enabled: true
# cardinality_total_limit: 200000
# projects:
# - project_id: "spanner project 1"
# service_account_key: "path to spanner project 1 service account json key"
# instances:
# - instance_id: "id1"
# databases:
# - "db11"
# - "db12"
# This section shows a sample prometheus config for self-observability metrics
# See https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/googlemanagedprometheusexporter#example-configuration
prometheus/self:
config:
scrape_configs:
- job_name: 'otel-collector'
scrape_interval: 10s
static_configs:
- targets: ['0.0.0.0:8888']
# I get duplicate label errors on export without dropping the incoming labels.
metric_relabel_configs:
- regex: service_instance_id
action: labeldrop
- regex: service_version
action: labeldrop
- regex: service_name
action: labeldrop
exporters:
googlecloud:
googlemanagedprometheus:
# googlecloudpubsub:
# project: my-project
# topic: my-topic
logging:
loglevel: debug
processors:
resourcedetection/gke:
detectors: [env, gcp]
timeout: 2s
override: false
memory_limiter:
check_interval: 1s
limit_percentage: 65
spike_limit_percentage: 20
batch:
send_batch_max_size: 200
send_batch_size: 200
service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, batch, resourcedetection/gke]
exporters: [googlecloud, logging]
metrics:
receivers: [otlp, prometheus/self]
processors: [memory_limiter, batch, resourcedetection/gke]
exporters: [googlecloud, logging]
#exporters: [googlemanagedprometheus]
logs:
receivers: [otlp]
processors: [memory_limiter, batch, resourcedetection/gke]
exporters: [googlecloud, logging]