ergon-framework-python 0.1.2__py3-none-any.whl → 0.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ergon/__init__.py +13 -13
- ergon/bootstrap/src/__project__/_observability/docker-compose.telemetry.yml +123 -123
- ergon/bootstrap/src/__project__/_observability/grafana.yaml +16 -16
- ergon/bootstrap/src/__project__/_observability/loki.yaml +47 -47
- ergon/bootstrap/src/__project__/_observability/otel-collector-config.yaml +52 -52
- ergon/bootstrap/src/__project__/_observability/prometheus.yaml +10 -10
- ergon/bootstrap/src/__project__/_observability/tempo.yaml +23 -23
- ergon/bootstrap/src/__project__/main.py +9 -9
- ergon/bootstrap/src/__project__/tasks/constants.py +13 -13
- ergon/bootstrap/src/__project__/tasks/example_task/config.py +4 -4
- ergon/bootstrap/src/__project__/tasks/example_task/exceptions.py +4 -4
- ergon/bootstrap/src/__project__/tasks/example_task/helpers.py +4 -4
- ergon/bootstrap/src/__project__/tasks/example_task/schemas.py +5 -5
- ergon/bootstrap/src/__project__/tasks/example_task/task.py +1 -1
- ergon/bootstrap/src/__project__/tasks/settings.py +5 -5
- ergon/cli.py +174 -174
- ergon/connector/__init__.py +98 -64
- ergon/connector/connector.py +97 -97
- ergon/connector/excel/__init__.py +18 -18
- ergon/connector/excel/connector.py +175 -175
- ergon/connector/excel/models.py +24 -24
- ergon/connector/excel/service.py +98 -98
- ergon/connector/nylas/__init__.py +45 -0
- ergon/connector/nylas/async_auth_service.py +15 -0
- ergon/connector/nylas/async_connector.py +127 -0
- ergon/connector/nylas/async_service.py +126 -0
- ergon/connector/nylas/auth_service.py +43 -0
- ergon/connector/nylas/connector.py +117 -0
- ergon/connector/nylas/models.py +210 -0
- ergon/connector/nylas/service.py +280 -0
- ergon/connector/nylas/utils.py +136 -0
- ergon/connector/pipefy/__init__.py +21 -21
- ergon/connector/pipefy/async_connector.py +48 -48
- ergon/connector/pipefy/async_service.py +907 -907
- ergon/connector/pipefy/connector.py +36 -36
- ergon/connector/pipefy/models.py +48 -48
- ergon/connector/pipefy/service.py +1016 -1016
- ergon/connector/pipefy/version.py +1 -1
- ergon/connector/postgres/__init__.py +11 -11
- ergon/connector/postgres/async_connector.py +119 -119
- ergon/connector/postgres/async_service.py +116 -116
- ergon/connector/postgres/models.py +34 -34
- ergon/connector/rabbitmq/__init__.py +25 -25
- ergon/connector/rabbitmq/async_connector.py +129 -129
- ergon/connector/rabbitmq/async_service.py +525 -525
- ergon/connector/rabbitmq/connector.py +54 -54
- ergon/connector/rabbitmq/helper.py +14 -14
- ergon/connector/rabbitmq/models.py +115 -115
- ergon/connector/rabbitmq/service.py +199 -199
- ergon/connector/sqs/__init__.py +15 -15
- ergon/connector/sqs/async_connector.py +120 -120
- ergon/connector/sqs/async_service.py +246 -246
- ergon/connector/sqs/connector.py +120 -120
- ergon/connector/sqs/models.py +36 -36
- ergon/connector/sqs/service.py +219 -219
- ergon/connector/transaction.py +14 -14
- ergon/service/__init__.py +5 -5
- ergon/service/service.py +17 -17
- ergon/task/__init__.py +13 -13
- ergon/task/base.py +222 -222
- ergon/task/exceptions.py +217 -217
- ergon/task/helpers.py +691 -691
- ergon/task/manager.py +85 -85
- ergon/task/mixins/__init__.py +13 -13
- ergon/task/mixins/consumer.py +887 -887
- ergon/task/mixins/metrics.py +457 -457
- ergon/task/mixins/producer.py +486 -486
- ergon/task/policies.py +229 -229
- ergon/task/runner.py +386 -386
- ergon/task/utils.py +64 -64
- ergon/telemetry/__init__.py +7 -7
- ergon/telemetry/_resource.py +13 -13
- ergon/telemetry/logging.py +370 -370
- ergon/telemetry/metrics.py +101 -101
- ergon/telemetry/tracing.py +152 -152
- ergon/utils/__init__.py +5 -5
- ergon/utils/env.py +26 -26
- {ergon_framework_python-0.1.2.dist-info → ergon_framework_python-0.1.3.dist-info}/METADATA +451 -449
- ergon_framework_python-0.1.3.dist-info/RECORD +91 -0
- {ergon_framework_python-0.1.2.dist-info → ergon_framework_python-0.1.3.dist-info}/licenses/LICENSE +21 -21
- ergon_framework_python-0.1.2.dist-info/RECORD +0 -82
- {ergon_framework_python-0.1.2.dist-info → ergon_framework_python-0.1.3.dist-info}/WHEEL +0 -0
- {ergon_framework_python-0.1.2.dist-info → ergon_framework_python-0.1.3.dist-info}/entry_points.txt +0 -0
- {ergon_framework_python-0.1.2.dist-info → ergon_framework_python-0.1.3.dist-info}/top_level.txt +0 -0
ergon/__init__.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
from . import connector, service, task, telemetry, utils
|
|
2
|
-
from .task.manager import manager
|
|
3
|
-
|
|
4
|
-
__all__ = [
|
|
5
|
-
"service",
|
|
6
|
-
"connector",
|
|
7
|
-
"task",
|
|
8
|
-
"telemetry",
|
|
9
|
-
"utils",
|
|
10
|
-
"manager",
|
|
11
|
-
]
|
|
12
|
-
|
|
13
|
-
__version__ = "0.1.
|
|
1
|
+
from . import connector, service, task, telemetry, utils
|
|
2
|
+
from .task.manager import manager
|
|
3
|
+
|
|
4
|
+
__all__ = [
|
|
5
|
+
"service",
|
|
6
|
+
"connector",
|
|
7
|
+
"task",
|
|
8
|
+
"telemetry",
|
|
9
|
+
"utils",
|
|
10
|
+
"manager",
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
__version__ = "0.1.3"
|
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
services:
|
|
2
|
-
|
|
3
|
-
############################################################
|
|
4
|
-
# OpenTelemetry Collector
|
|
5
|
-
############################################################
|
|
6
|
-
otel-collector:
|
|
7
|
-
image: otel/opentelemetry-collector-contrib:0.114.0
|
|
8
|
-
container_name: ergon-otel-collector
|
|
9
|
-
restart: unless-stopped
|
|
10
|
-
command: ["--config=/etc/otelcol/config.yaml"]
|
|
11
|
-
volumes:
|
|
12
|
-
- ./otel-collector-config.yaml:/etc/otelcol/config.yaml:ro
|
|
13
|
-
ports:
|
|
14
|
-
- "4317:4317" # OTLP gRPC
|
|
15
|
-
- "4318:4318" # OTLP HTTP
|
|
16
|
-
- "9464:9464" # Prometheus scrape (metrics)
|
|
17
|
-
depends_on:
|
|
18
|
-
- tempo
|
|
19
|
-
- loki
|
|
20
|
-
healthcheck:
|
|
21
|
-
test: ["CMD", "wget", "--spider", "-q", "http://localhost:13133/"]
|
|
22
|
-
interval: 10s
|
|
23
|
-
timeout: 5s
|
|
24
|
-
retries: 5
|
|
25
|
-
networks:
|
|
26
|
-
- ergon-telemetry
|
|
27
|
-
|
|
28
|
-
############################################################
|
|
29
|
-
# Loki (Logs)
|
|
30
|
-
############################################################
|
|
31
|
-
loki:
|
|
32
|
-
image: grafana/loki:3.0.0
|
|
33
|
-
container_name: ergon-loki
|
|
34
|
-
restart: unless-stopped
|
|
35
|
-
volumes:
|
|
36
|
-
- ./loki.yaml:/etc/loki/config.yaml:ro
|
|
37
|
-
- loki-data:/loki
|
|
38
|
-
command: -config.file=/etc/loki/config.yaml
|
|
39
|
-
ports:
|
|
40
|
-
- "3100:3100"
|
|
41
|
-
healthcheck:
|
|
42
|
-
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3100/ready"]
|
|
43
|
-
interval: 10s
|
|
44
|
-
timeout: 5s
|
|
45
|
-
retries: 5
|
|
46
|
-
networks:
|
|
47
|
-
- ergon-telemetry
|
|
48
|
-
|
|
49
|
-
############################################################
|
|
50
|
-
# Tempo (Traces)
|
|
51
|
-
############################################################
|
|
52
|
-
tempo:
|
|
53
|
-
image: grafana/tempo:2.4.1
|
|
54
|
-
container_name: ergon-tempo
|
|
55
|
-
restart: unless-stopped
|
|
56
|
-
volumes:
|
|
57
|
-
- ./tempo.yaml:/etc/tempo/config.yaml:ro
|
|
58
|
-
- tempo-data:/var/tempo
|
|
59
|
-
command: ["-config.file=/etc/tempo/config.yaml"]
|
|
60
|
-
ports:
|
|
61
|
-
- "3200:3200"
|
|
62
|
-
healthcheck:
|
|
63
|
-
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3200/ready"]
|
|
64
|
-
interval: 10s
|
|
65
|
-
timeout: 5s
|
|
66
|
-
retries: 5
|
|
67
|
-
networks:
|
|
68
|
-
- ergon-telemetry
|
|
69
|
-
|
|
70
|
-
############################################################
|
|
71
|
-
# Prometheus (Metrics)
|
|
72
|
-
############################################################
|
|
73
|
-
prometheus:
|
|
74
|
-
image: prom/prometheus:latest
|
|
75
|
-
container_name: ergon-prometheus
|
|
76
|
-
restart: unless-stopped
|
|
77
|
-
volumes:
|
|
78
|
-
- ./prometheus.yaml:/etc/prometheus/prometheus.yml:ro
|
|
79
|
-
- prom-data:/prometheus
|
|
80
|
-
command:
|
|
81
|
-
- "--config.file=/etc/prometheus/prometheus.yml"
|
|
82
|
-
ports:
|
|
83
|
-
- "9090:9090"
|
|
84
|
-
depends_on:
|
|
85
|
-
- otel-collector
|
|
86
|
-
healthcheck:
|
|
87
|
-
test: ["CMD", "wget", "--spider", "-q", "http://localhost:9090/-/ready"]
|
|
88
|
-
interval: 10s
|
|
89
|
-
timeout: 5s
|
|
90
|
-
retries: 5
|
|
91
|
-
networks:
|
|
92
|
-
- ergon-telemetry
|
|
93
|
-
|
|
94
|
-
############################################################
|
|
95
|
-
# Grafana Dashboard UI
|
|
96
|
-
############################################################
|
|
97
|
-
grafana:
|
|
98
|
-
image: grafana/grafana:10.4.0
|
|
99
|
-
container_name: ergon-grafana
|
|
100
|
-
restart: unless-stopped
|
|
101
|
-
volumes:
|
|
102
|
-
- ./grafana.yaml:/etc/grafana/provisioning/datasources/datasources.yaml:ro
|
|
103
|
-
- grafana-data:/var/lib/grafana
|
|
104
|
-
ports:
|
|
105
|
-
- "3000:3000"
|
|
106
|
-
networks:
|
|
107
|
-
- ergon-telemetry
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
############################################################
|
|
111
|
-
# Volumes
|
|
112
|
-
############################################################
|
|
113
|
-
volumes:
|
|
114
|
-
loki-data:
|
|
115
|
-
tempo-data:
|
|
116
|
-
prom-data:
|
|
117
|
-
grafana-data:
|
|
118
|
-
|
|
119
|
-
############################################################
|
|
120
|
-
# Network
|
|
121
|
-
############################################################
|
|
122
|
-
networks:
|
|
123
|
-
ergon-telemetry:
|
|
1
|
+
services:
|
|
2
|
+
|
|
3
|
+
############################################################
|
|
4
|
+
# OpenTelemetry Collector
|
|
5
|
+
############################################################
|
|
6
|
+
otel-collector:
|
|
7
|
+
image: otel/opentelemetry-collector-contrib:0.114.0
|
|
8
|
+
container_name: ergon-otel-collector
|
|
9
|
+
restart: unless-stopped
|
|
10
|
+
command: ["--config=/etc/otelcol/config.yaml"]
|
|
11
|
+
volumes:
|
|
12
|
+
- ./otel-collector-config.yaml:/etc/otelcol/config.yaml:ro
|
|
13
|
+
ports:
|
|
14
|
+
- "4317:4317" # OTLP gRPC
|
|
15
|
+
- "4318:4318" # OTLP HTTP
|
|
16
|
+
- "9464:9464" # Prometheus scrape (metrics)
|
|
17
|
+
depends_on:
|
|
18
|
+
- tempo
|
|
19
|
+
- loki
|
|
20
|
+
healthcheck:
|
|
21
|
+
test: ["CMD", "wget", "--spider", "-q", "http://localhost:13133/"]
|
|
22
|
+
interval: 10s
|
|
23
|
+
timeout: 5s
|
|
24
|
+
retries: 5
|
|
25
|
+
networks:
|
|
26
|
+
- ergon-telemetry
|
|
27
|
+
|
|
28
|
+
############################################################
|
|
29
|
+
# Loki (Logs)
|
|
30
|
+
############################################################
|
|
31
|
+
loki:
|
|
32
|
+
image: grafana/loki:3.0.0
|
|
33
|
+
container_name: ergon-loki
|
|
34
|
+
restart: unless-stopped
|
|
35
|
+
volumes:
|
|
36
|
+
- ./loki.yaml:/etc/loki/config.yaml:ro
|
|
37
|
+
- loki-data:/loki
|
|
38
|
+
command: -config.file=/etc/loki/config.yaml
|
|
39
|
+
ports:
|
|
40
|
+
- "3100:3100"
|
|
41
|
+
healthcheck:
|
|
42
|
+
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3100/ready"]
|
|
43
|
+
interval: 10s
|
|
44
|
+
timeout: 5s
|
|
45
|
+
retries: 5
|
|
46
|
+
networks:
|
|
47
|
+
- ergon-telemetry
|
|
48
|
+
|
|
49
|
+
############################################################
|
|
50
|
+
# Tempo (Traces)
|
|
51
|
+
############################################################
|
|
52
|
+
tempo:
|
|
53
|
+
image: grafana/tempo:2.4.1
|
|
54
|
+
container_name: ergon-tempo
|
|
55
|
+
restart: unless-stopped
|
|
56
|
+
volumes:
|
|
57
|
+
- ./tempo.yaml:/etc/tempo/config.yaml:ro
|
|
58
|
+
- tempo-data:/var/tempo
|
|
59
|
+
command: ["-config.file=/etc/tempo/config.yaml"]
|
|
60
|
+
ports:
|
|
61
|
+
- "3200:3200"
|
|
62
|
+
healthcheck:
|
|
63
|
+
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3200/ready"]
|
|
64
|
+
interval: 10s
|
|
65
|
+
timeout: 5s
|
|
66
|
+
retries: 5
|
|
67
|
+
networks:
|
|
68
|
+
- ergon-telemetry
|
|
69
|
+
|
|
70
|
+
############################################################
|
|
71
|
+
# Prometheus (Metrics)
|
|
72
|
+
############################################################
|
|
73
|
+
prometheus:
|
|
74
|
+
image: prom/prometheus:latest
|
|
75
|
+
container_name: ergon-prometheus
|
|
76
|
+
restart: unless-stopped
|
|
77
|
+
volumes:
|
|
78
|
+
- ./prometheus.yaml:/etc/prometheus/prometheus.yml:ro
|
|
79
|
+
- prom-data:/prometheus
|
|
80
|
+
command:
|
|
81
|
+
- "--config.file=/etc/prometheus/prometheus.yml"
|
|
82
|
+
ports:
|
|
83
|
+
- "9090:9090"
|
|
84
|
+
depends_on:
|
|
85
|
+
- otel-collector
|
|
86
|
+
healthcheck:
|
|
87
|
+
test: ["CMD", "wget", "--spider", "-q", "http://localhost:9090/-/ready"]
|
|
88
|
+
interval: 10s
|
|
89
|
+
timeout: 5s
|
|
90
|
+
retries: 5
|
|
91
|
+
networks:
|
|
92
|
+
- ergon-telemetry
|
|
93
|
+
|
|
94
|
+
############################################################
|
|
95
|
+
# Grafana Dashboard UI
|
|
96
|
+
############################################################
|
|
97
|
+
grafana:
|
|
98
|
+
image: grafana/grafana:10.4.0
|
|
99
|
+
container_name: ergon-grafana
|
|
100
|
+
restart: unless-stopped
|
|
101
|
+
volumes:
|
|
102
|
+
- ./grafana.yaml:/etc/grafana/provisioning/datasources/datasources.yaml:ro
|
|
103
|
+
- grafana-data:/var/lib/grafana
|
|
104
|
+
ports:
|
|
105
|
+
- "3000:3000"
|
|
106
|
+
networks:
|
|
107
|
+
- ergon-telemetry
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
############################################################
|
|
111
|
+
# Volumes
|
|
112
|
+
############################################################
|
|
113
|
+
volumes:
|
|
114
|
+
loki-data:
|
|
115
|
+
tempo-data:
|
|
116
|
+
prom-data:
|
|
117
|
+
grafana-data:
|
|
118
|
+
|
|
119
|
+
############################################################
|
|
120
|
+
# Network
|
|
121
|
+
############################################################
|
|
122
|
+
networks:
|
|
123
|
+
ergon-telemetry:
|
|
124
124
|
driver: bridge
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
apiVersion: 1
|
|
2
|
-
|
|
3
|
-
datasources:
|
|
4
|
-
- name: Loki
|
|
5
|
-
type: loki
|
|
6
|
-
access: proxy
|
|
7
|
-
url: http://loki:3100
|
|
8
|
-
|
|
9
|
-
- name: Tempo
|
|
10
|
-
type: tempo
|
|
11
|
-
access: proxy
|
|
12
|
-
url: http://tempo:3200
|
|
13
|
-
|
|
14
|
-
- name: Prometheus
|
|
15
|
-
type: prometheus
|
|
16
|
-
access: proxy
|
|
1
|
+
apiVersion: 1
|
|
2
|
+
|
|
3
|
+
datasources:
|
|
4
|
+
- name: Loki
|
|
5
|
+
type: loki
|
|
6
|
+
access: proxy
|
|
7
|
+
url: http://loki:3100
|
|
8
|
+
|
|
9
|
+
- name: Tempo
|
|
10
|
+
type: tempo
|
|
11
|
+
access: proxy
|
|
12
|
+
url: http://tempo:3200
|
|
13
|
+
|
|
14
|
+
- name: Prometheus
|
|
15
|
+
type: prometheus
|
|
16
|
+
access: proxy
|
|
17
17
|
url: http://prometheus:9090
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
auth_enabled: false
|
|
2
|
-
|
|
3
|
-
server:
|
|
4
|
-
http_listen_port: 3100
|
|
5
|
-
grpc_listen_port: 9096
|
|
6
|
-
|
|
7
|
-
common:
|
|
8
|
-
instance_addr: 127.0.0.1
|
|
9
|
-
path_prefix: /loki
|
|
10
|
-
storage:
|
|
11
|
-
filesystem:
|
|
12
|
-
chunks_directory: /loki/chunks
|
|
13
|
-
rules_directory: /loki/rules
|
|
14
|
-
replication_factor: 1
|
|
15
|
-
ring:
|
|
16
|
-
kvstore:
|
|
17
|
-
store: inmemory
|
|
18
|
-
|
|
19
|
-
query_range:
|
|
20
|
-
results_cache:
|
|
21
|
-
cache:
|
|
22
|
-
embedded_cache:
|
|
23
|
-
enabled: true
|
|
24
|
-
max_size_mb: 100
|
|
25
|
-
|
|
26
|
-
schema_config:
|
|
27
|
-
configs:
|
|
28
|
-
- from: "2024-01-01"
|
|
29
|
-
store: tsdb
|
|
30
|
-
object_store: filesystem
|
|
31
|
-
schema: v13
|
|
32
|
-
index:
|
|
33
|
-
prefix: index_
|
|
34
|
-
period: 24h
|
|
35
|
-
|
|
36
|
-
pattern_ingester:
|
|
37
|
-
enabled: true
|
|
38
|
-
|
|
39
|
-
compactor:
|
|
40
|
-
working_directory: /loki/boltdb-shipper-compactor
|
|
41
|
-
# shared_store: filesystem <-- REMOVED (Invalid in Loki 3.0)
|
|
42
|
-
delete_request_store: filesystem # <-- ADDED (Required for retention)
|
|
43
|
-
retention_enabled: true
|
|
44
|
-
|
|
45
|
-
limits_config:
|
|
46
|
-
retention_period: 24h
|
|
47
|
-
allow_structured_metadata: true
|
|
1
|
+
auth_enabled: false
|
|
2
|
+
|
|
3
|
+
server:
|
|
4
|
+
http_listen_port: 3100
|
|
5
|
+
grpc_listen_port: 9096
|
|
6
|
+
|
|
7
|
+
common:
|
|
8
|
+
instance_addr: 127.0.0.1
|
|
9
|
+
path_prefix: /loki
|
|
10
|
+
storage:
|
|
11
|
+
filesystem:
|
|
12
|
+
chunks_directory: /loki/chunks
|
|
13
|
+
rules_directory: /loki/rules
|
|
14
|
+
replication_factor: 1
|
|
15
|
+
ring:
|
|
16
|
+
kvstore:
|
|
17
|
+
store: inmemory
|
|
18
|
+
|
|
19
|
+
query_range:
|
|
20
|
+
results_cache:
|
|
21
|
+
cache:
|
|
22
|
+
embedded_cache:
|
|
23
|
+
enabled: true
|
|
24
|
+
max_size_mb: 100
|
|
25
|
+
|
|
26
|
+
schema_config:
|
|
27
|
+
configs:
|
|
28
|
+
- from: "2024-01-01"
|
|
29
|
+
store: tsdb
|
|
30
|
+
object_store: filesystem
|
|
31
|
+
schema: v13
|
|
32
|
+
index:
|
|
33
|
+
prefix: index_
|
|
34
|
+
period: 24h
|
|
35
|
+
|
|
36
|
+
pattern_ingester:
|
|
37
|
+
enabled: true
|
|
38
|
+
|
|
39
|
+
compactor:
|
|
40
|
+
working_directory: /loki/boltdb-shipper-compactor
|
|
41
|
+
# shared_store: filesystem <-- REMOVED (Invalid in Loki 3.0)
|
|
42
|
+
delete_request_store: filesystem # <-- ADDED (Required for retention)
|
|
43
|
+
retention_enabled: true
|
|
44
|
+
|
|
45
|
+
limits_config:
|
|
46
|
+
retention_period: 24h
|
|
47
|
+
allow_structured_metadata: true
|
|
48
48
|
max_query_length: 720h
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
receivers:
|
|
2
|
-
otlp:
|
|
3
|
-
protocols:
|
|
4
|
-
http:
|
|
5
|
-
endpoint: 0.0.0.0:4318
|
|
6
|
-
grpc:
|
|
7
|
-
endpoint: 0.0.0.0:4317
|
|
8
|
-
|
|
9
|
-
exporters:
|
|
10
|
-
loki:
|
|
11
|
-
endpoint: http://loki:3100/loki/api/v1/push
|
|
12
|
-
labels:
|
|
13
|
-
resource:
|
|
14
|
-
service.name: "service_name"
|
|
15
|
-
service.version: "service_version"
|
|
16
|
-
ergon.task.name: "task_name"
|
|
17
|
-
ergon.task.execution.host.name: "host_name"
|
|
18
|
-
attributes:
|
|
19
|
-
level: "level"
|
|
20
|
-
|
|
21
|
-
default_labels_enabled:
|
|
22
|
-
exporter: false
|
|
23
|
-
resource: false
|
|
24
|
-
attributes: false
|
|
25
|
-
scope: false
|
|
26
|
-
|
|
27
|
-
otlphttp/tempo:
|
|
28
|
-
endpoint: http://tempo:4318
|
|
29
|
-
tls:
|
|
30
|
-
insecure: true
|
|
31
|
-
|
|
32
|
-
prometheus:
|
|
33
|
-
endpoint: "0.0.0.0:9464"
|
|
34
|
-
|
|
35
|
-
processors:
|
|
36
|
-
batch: {}
|
|
37
|
-
|
|
38
|
-
service:
|
|
39
|
-
pipelines:
|
|
40
|
-
logs:
|
|
41
|
-
receivers: [otlp]
|
|
42
|
-
processors: [batch] # ← Changed: removed "resource"
|
|
43
|
-
exporters: [loki]
|
|
44
|
-
|
|
45
|
-
traces:
|
|
46
|
-
receivers: [otlp]
|
|
47
|
-
processors: [batch] # ← Changed: removed "resource"
|
|
48
|
-
exporters: [otlphttp/tempo]
|
|
49
|
-
|
|
50
|
-
metrics:
|
|
51
|
-
receivers: [otlp]
|
|
52
|
-
processors: [batch]
|
|
1
|
+
receivers:
|
|
2
|
+
otlp:
|
|
3
|
+
protocols:
|
|
4
|
+
http:
|
|
5
|
+
endpoint: 0.0.0.0:4318
|
|
6
|
+
grpc:
|
|
7
|
+
endpoint: 0.0.0.0:4317
|
|
8
|
+
|
|
9
|
+
exporters:
|
|
10
|
+
loki:
|
|
11
|
+
endpoint: http://loki:3100/loki/api/v1/push
|
|
12
|
+
labels:
|
|
13
|
+
resource:
|
|
14
|
+
service.name: "service_name"
|
|
15
|
+
service.version: "service_version"
|
|
16
|
+
ergon.task.name: "task_name"
|
|
17
|
+
ergon.task.execution.host.name: "host_name"
|
|
18
|
+
attributes:
|
|
19
|
+
level: "level"
|
|
20
|
+
|
|
21
|
+
default_labels_enabled:
|
|
22
|
+
exporter: false
|
|
23
|
+
resource: false
|
|
24
|
+
attributes: false
|
|
25
|
+
scope: false
|
|
26
|
+
|
|
27
|
+
otlphttp/tempo:
|
|
28
|
+
endpoint: http://tempo:4318
|
|
29
|
+
tls:
|
|
30
|
+
insecure: true
|
|
31
|
+
|
|
32
|
+
prometheus:
|
|
33
|
+
endpoint: "0.0.0.0:9464"
|
|
34
|
+
|
|
35
|
+
processors:
|
|
36
|
+
batch: {}
|
|
37
|
+
|
|
38
|
+
service:
|
|
39
|
+
pipelines:
|
|
40
|
+
logs:
|
|
41
|
+
receivers: [otlp]
|
|
42
|
+
processors: [batch] # ← Changed: removed "resource"
|
|
43
|
+
exporters: [loki]
|
|
44
|
+
|
|
45
|
+
traces:
|
|
46
|
+
receivers: [otlp]
|
|
47
|
+
processors: [batch] # ← Changed: removed "resource"
|
|
48
|
+
exporters: [otlphttp/tempo]
|
|
49
|
+
|
|
50
|
+
metrics:
|
|
51
|
+
receivers: [otlp]
|
|
52
|
+
processors: [batch]
|
|
53
53
|
exporters: [prometheus]
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
global:
|
|
2
|
-
scrape_interval: 5s
|
|
3
|
-
|
|
4
|
-
scrape_configs:
|
|
5
|
-
- job_name: "otel-collector"
|
|
6
|
-
static_configs:
|
|
7
|
-
- targets: ["otel-collector:9464"]
|
|
8
|
-
|
|
9
|
-
- job_name: "ergon_tasks"
|
|
10
|
-
static_configs:
|
|
1
|
+
global:
|
|
2
|
+
scrape_interval: 5s
|
|
3
|
+
|
|
4
|
+
scrape_configs:
|
|
5
|
+
- job_name: "otel-collector"
|
|
6
|
+
static_configs:
|
|
7
|
+
- targets: ["otel-collector:9464"]
|
|
8
|
+
|
|
9
|
+
- job_name: "ergon_tasks"
|
|
10
|
+
static_configs:
|
|
11
11
|
- targets: ["otel-collector:9464"]
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
server:
|
|
2
|
-
http_listen_port: 3200
|
|
3
|
-
grpc_listen_port: 9095
|
|
4
|
-
|
|
5
|
-
distributor:
|
|
6
|
-
receivers:
|
|
7
|
-
otlp:
|
|
8
|
-
protocols:
|
|
9
|
-
grpc:
|
|
10
|
-
http:
|
|
11
|
-
|
|
12
|
-
ingester:
|
|
13
|
-
max_block_bytes: 100_000_000
|
|
14
|
-
max_block_duration: 5m
|
|
15
|
-
|
|
16
|
-
compactor:
|
|
17
|
-
compaction:
|
|
18
|
-
block_retention: 24h
|
|
19
|
-
|
|
20
|
-
storage:
|
|
21
|
-
trace:
|
|
22
|
-
backend: local
|
|
23
|
-
local:
|
|
1
|
+
server:
|
|
2
|
+
http_listen_port: 3200
|
|
3
|
+
grpc_listen_port: 9095
|
|
4
|
+
|
|
5
|
+
distributor:
|
|
6
|
+
receivers:
|
|
7
|
+
otlp:
|
|
8
|
+
protocols:
|
|
9
|
+
grpc:
|
|
10
|
+
http:
|
|
11
|
+
|
|
12
|
+
ingester:
|
|
13
|
+
max_block_bytes: 100_000_000
|
|
14
|
+
max_block_duration: 5m
|
|
15
|
+
|
|
16
|
+
compactor:
|
|
17
|
+
compaction:
|
|
18
|
+
block_retention: 24h
|
|
19
|
+
|
|
20
|
+
storage:
|
|
21
|
+
trace:
|
|
22
|
+
backend: local
|
|
23
|
+
local:
|
|
24
24
|
path: /var/tempo/traces
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
from ergon.cli import ergon
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def main():
|
|
5
|
-
ergon()
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if __name__ == "__main__":
|
|
9
|
-
main()
|
|
1
|
+
from ergon.cli import ergon
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def main():
|
|
5
|
+
ergon()
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
if __name__ == "__main__":
|
|
9
|
+
main()
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
from ergon.task.policies import RetryPolicy
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
# ----------------------------------------
|
|
5
|
-
# --- RETRY POLICY CONFIGURATION ---
|
|
6
|
-
# ----------------------------------------
|
|
7
|
-
def default_retry_policy():
|
|
8
|
-
return RetryPolicy(
|
|
9
|
-
max_attempts=3,
|
|
10
|
-
backoff=1,
|
|
11
|
-
backoff_multiplier=2,
|
|
12
|
-
backoff_cap=10,
|
|
13
|
-
)
|
|
1
|
+
from ergon.task.policies import RetryPolicy
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# ----------------------------------------
|
|
5
|
+
# --- RETRY POLICY CONFIGURATION ---
|
|
6
|
+
# ----------------------------------------
|
|
7
|
+
def default_retry_policy():
|
|
8
|
+
return RetryPolicy(
|
|
9
|
+
max_attempts=3,
|
|
10
|
+
backoff=1,
|
|
11
|
+
backoff_multiplier=2,
|
|
12
|
+
backoff_cap=10,
|
|
13
|
+
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Uncomment below to use framework imports
|
|
2
|
-
# ----------------------------------------
|
|
3
|
-
|
|
4
|
-
# from ergon import task
|
|
1
|
+
# Uncomment below to use framework imports
|
|
2
|
+
# ----------------------------------------
|
|
3
|
+
|
|
4
|
+
# from ergon import task
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Uncomment below to use framework imports
|
|
2
|
-
# ----------------------------------------
|
|
3
|
-
|
|
4
|
-
# from ergon.task.exceptions import TransactionException
|
|
1
|
+
# Uncomment below to use framework imports
|
|
2
|
+
# ----------------------------------------
|
|
3
|
+
|
|
4
|
+
# from ergon.task.exceptions import TransactionException
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Uncomment below to use framework imports
|
|
2
|
-
# ----------------------------------------
|
|
3
|
-
|
|
4
|
-
# from .. import helpers as shared
|
|
1
|
+
# Uncomment below to use framework imports
|
|
2
|
+
# ----------------------------------------
|
|
3
|
+
|
|
4
|
+
# from .. import helpers as shared
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# Uncomment below to use framework imports
|
|
2
|
-
# ----------------------------------------
|
|
3
|
-
|
|
4
|
-
# from pydantic import BaseModel
|
|
5
|
-
# from .. import schemas as shared
|
|
1
|
+
# Uncomment below to use framework imports
|
|
2
|
+
# ----------------------------------------
|
|
3
|
+
|
|
4
|
+
# from pydantic import BaseModel
|
|
5
|
+
# from .. import schemas as shared
|
|
@@ -1 +1 @@
|
|
|
1
|
-
# from ergon import task, connector
|
|
1
|
+
# from ergon import task, connector
|