File size: 5,113 Bytes
31e8457
051bada
 
 
 
 
 
 
31e8457
 
 
 
 
 
 
 
 
 
051bada
 
 
 
 
 
 
 
31e8457
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
051bada
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31e8457
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
051bada
 
 
 
31e8457
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
106
107
108
109
110
111
112
113
114
115
/**
 * Configures OpenTelemetry Protocol (OTLP) HTTP export for Effect telemetry.
 *
 * This module installs the OTLP logger, metrics exporter, and tracer exporter
 * from one shared configuration. Use it when an application sends logs, metrics,
 * and traces to the same OpenTelemetry Collector, vendor OTLP endpoint, or local
 * development collector.
 *
 * @since 4.0.0
 */
import type * as Duration from "../../Duration.ts";
import * as Layer from "../../Layer.ts";
import type * as Tracer from "../../Tracer.ts";
import type * as Headers from "../http/Headers.ts";
import type * as HttpClient from "../http/HttpClient.ts";
import type { AggregationTemporality } from "./OtlpMetrics.ts";
import * as OtlpSerialization from "./OtlpSerialization.ts";
/**
 * Creates a combined OTLP layer for logs, metrics, and traces.
 *
 * **Details**
 *
 * The layer sends data to `/v1/logs`, `/v1/metrics`, and `/v1/traces` below
 * `baseUrl` and requires an `OtlpSerialization` implementation.
 *
 * @category layers
 * @since 4.0.0
 */
export declare const layer: (options: {
    readonly baseUrl: string;
    readonly resource?: {
        readonly serviceName?: string | undefined;
        readonly serviceVersion?: string | undefined;
        readonly attributes?: Record<string, unknown>;
    } | undefined;
    readonly headers?: Headers.Input | undefined;
    readonly maxBatchSize?: number | undefined;
    readonly tracerContext?: (<X>(primitive: Tracer.EffectPrimitive<X>, span: Tracer.AnySpan) => X) | undefined;
    readonly loggerExportInterval?: Duration.Input | undefined;
    readonly loggerExcludeLogSpans?: boolean | undefined;
    readonly loggerMergeWithExisting?: boolean | undefined;
    readonly metricsExportInterval?: Duration.Input | undefined;
    readonly metricsTemporality?: AggregationTemporality | undefined;
    readonly tracerExportInterval?: Duration.Input | undefined;
    readonly shutdownTimeout?: Duration.Input | undefined;
}) => Layer.Layer<never, never, HttpClient.HttpClient | OtlpSerialization.OtlpSerialization>;
/**
 * Creates a combined OTLP layer for logs, metrics, and traces from
 * OpenTelemetry configuration.
 *
 * @category layers
 * @since 4.0.0
 */
export declare const layerFromConfig: (options?: {
    readonly resource?: {
        readonly serviceName?: string | undefined;
        readonly serviceVersion?: string | undefined;
        readonly attributes?: Record<string, unknown>;
    } | undefined;
    readonly headers?: Headers.Input | undefined;
    readonly tracerContext?: (<X>(primitive: Tracer.EffectPrimitive<X>, span: Tracer.AnySpan) => X) | undefined;
    readonly loggerExcludeLogSpans?: boolean | undefined;
    readonly loggerMergeWithExisting?: boolean | undefined;
}) => Layer.Layer<never, never, HttpClient.HttpClient | OtlpSerialization.OtlpSerialization>;
/**
 * Creates the combined OTLP logs, metrics, and traces layer using JSON
 * serialization.
 *
 * @category layers
 * @since 4.0.0
 */
export declare const layerJson: (options: {
    readonly baseUrl: string;
    readonly resource?: {
        readonly serviceName?: string | undefined;
        readonly serviceVersion?: string | undefined;
        readonly attributes?: Record<string, unknown>;
    } | undefined;
    readonly headers?: Headers.Input | undefined;
    readonly maxBatchSize?: number | undefined;
    readonly tracerContext?: (<X>(primitive: Tracer.EffectPrimitive<X>, span: Tracer.AnySpan) => X) | undefined;
    readonly loggerExportInterval?: Duration.Input | undefined;
    readonly loggerExcludeLogSpans?: boolean | undefined;
    readonly loggerMergeWithExisting?: boolean | undefined;
    readonly metricsExportInterval?: Duration.Input | undefined;
    readonly metricsTemporality?: AggregationTemporality | undefined;
    readonly tracerExportInterval?: Duration.Input | undefined;
    readonly shutdownTimeout?: Duration.Input | undefined;
}) => Layer.Layer<never, never, HttpClient.HttpClient>;
/**
 * Creates the combined OTLP logs, metrics, and traces layer using protobuf
 * serialization.
 *
 * @category layers
 * @since 4.0.0
 */
export declare const layerProtobuf: (options: {
    readonly baseUrl: string;
    readonly resource?: {
        readonly serviceName?: string | undefined;
        readonly serviceVersion?: string | undefined;
        readonly attributes?: Record<string, unknown>;
    } | undefined;
    readonly headers?: Headers.Input | undefined;
    readonly maxBatchSize?: number | undefined;
    readonly tracerContext?: (<X>(primitive: Tracer.EffectPrimitive<X>, span: Tracer.AnySpan) => X) | undefined;
    readonly loggerExportInterval?: Duration.Input | undefined;
    readonly loggerExcludeLogSpans?: boolean | undefined;
    readonly loggerMergeWithExisting?: boolean | undefined;
    readonly metricsExportInterval?: Duration.Input | undefined;
    readonly metricsTemporality?: AggregationTemporality | undefined;
    readonly tracerExportInterval?: Duration.Input | undefined;
    readonly shutdownTimeout?: Duration.Input | undefined;
}) => Layer.Layer<never, never, HttpClient.HttpClient>;
//# sourceMappingURL=Otlp.d.ts.map