-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathobservability_pipeline_opentelemetry_source.py
More file actions
67 lines (54 loc) · 2.25 KB
/
observability_pipeline_opentelemetry_source.py
File metadata and controls
67 lines (54 loc) · 2.25 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
67
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations
from typing import Union, TYPE_CHECKING
from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
)
if TYPE_CHECKING:
from datadog_api_client.v2.model.observability_pipeline_tls import ObservabilityPipelineTls
from datadog_api_client.v2.model.observability_pipeline_opentelemetry_source_type import (
ObservabilityPipelineOpentelemetrySourceType,
)
class ObservabilityPipelineOpentelemetrySource(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.observability_pipeline_tls import ObservabilityPipelineTls
from datadog_api_client.v2.model.observability_pipeline_opentelemetry_source_type import (
ObservabilityPipelineOpentelemetrySourceType,
)
return {
"id": (str,),
"tls": (ObservabilityPipelineTls,),
"type": (ObservabilityPipelineOpentelemetrySourceType,),
}
attribute_map = {
"id": "id",
"tls": "tls",
"type": "type",
}
def __init__(
self_,
id: str,
type: ObservabilityPipelineOpentelemetrySourceType,
tls: Union[ObservabilityPipelineTls, UnsetType] = unset,
**kwargs,
):
"""
The ``opentelemetry`` source receives OpenTelemetry data through gRPC or HTTP.
:param id: The unique identifier for this component. Used to reference this component in other parts of the pipeline (e.g., as input to downstream components).
:type id: str
:param tls: Configuration for enabling TLS encryption between the pipeline component and external services.
:type tls: ObservabilityPipelineTls, optional
:param type: The source type. The value should always be ``opentelemetry``.
:type type: ObservabilityPipelineOpentelemetrySourceType
"""
if tls is not unset:
kwargs["tls"] = tls
super().__init__(kwargs)
self_.id = id
self_.type = type