-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathexports.py
More file actions
66 lines (58 loc) · 1.79 KB
/
exports.py
File metadata and controls
66 lines (58 loc) · 1.79 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
58
59
60
61
62
63
64
65
66
from pydantic import BaseModel, Field
# BasicAuth class
class BasicAuth(BaseModel):
username: str = Field(
description="Username for the basic auth.",
min_length=1,
)
password: str = Field(
description="Password for the basic auth.",
min_length=1,
)
# Prometheus Remote Write
class PrometheusRW(BaseModel):
endpoint: str = Field(
description="Prometheus remote write endpoint.",
min_length=1,
)
basic_auth: BasicAuth | None = Field(
description="Basic auth for the prometheus remote write endpoint.",
default=None,
)
tags: list[str] = Field(
description="Tags to add to the prometheus remote write data.",
default=[],
)
scrape_interval: str = Field(
description="Scrape interval for the execution client metrics.",
default="2s",
)
scrape_timeout: str = Field(
description="Scrape timeout for the execution client metrics.",
default="1s",
)
# Pyroscope configuration
class Pyroscope(BaseModel):
endpoint: str = Field(
description="Pyroscope endpoint.",
min_length=1,
)
basic_auth: BasicAuth | None = Field(
description="Basic auth for the pyroscope endpoint.",
default=None,
)
tags: list[str] = Field(
description="Tags to add to the pyroscope profiling data.",
default=[],
)
# Exports represents a collection of configured export options for a expb scenario
class Exports(BaseModel):
prometheus_rw: PrometheusRW | None = Field(
description="Prometheus remote write configuration.",
alias="prometheus_remote_write",
default=None,
)
pyroscope: Pyroscope | None = Field(
description="Pyroscope configuration.",
default=None,
)