|
| 1 | +//===----------------------------------------------------------------------===// |
| 2 | +// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved. |
| 3 | +// |
| 4 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +// you may not use this file except in compliance with the License. |
| 6 | +// You may obtain a copy of the License at |
| 7 | +// |
| 8 | +// https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +// |
| 10 | +// Unless required by applicable law or agreed to in writing, software |
| 11 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +// See the License for the specific language governing permissions and |
| 14 | +// limitations under the License. |
| 15 | +//===----------------------------------------------------------------------===// |
| 16 | +/// Sends metrics to [OpenTelemetry](https://opentelemetry.io) servers and agents via gRPC. |
| 17 | +/// |
| 18 | +/// <https://github.com/influxdata/telegraf/tree/master/plugins/outputs/opentelemetry> |
| 19 | +@ModuleInfo { minPklVersion = "0.24.0" } |
| 20 | +open module com.influxdata.telegraf.plugins.outputs.OpenTelemetryOutput |
| 21 | + |
| 22 | +extends "Output.pkl" |
| 23 | + |
| 24 | +/// The endpoint to which the metrics will be sent. |
| 25 | +/// |
| 26 | +/// Default: `"localhost:4317"` |
| 27 | +service_address: String? |
| 28 | + |
| 29 | +/// The timeout for the connection. |
| 30 | +/// |
| 31 | +/// Default: `5.s` |
| 32 | +timeout: Duration? |
| 33 | + |
| 34 | +/// Optional TLS Config. |
| 35 | +/// All variables should specify full path to the file. |
| 36 | +/// Root certificates for verifying server certificates encoded in PEM format. |
| 37 | +tls_ca: String? |
| 38 | + |
| 39 | +/// Path to the TLS certificate for the client encoded in PEM format. |
| 40 | +/// May contain intermediate certificates. |
| 41 | +tls_cert: String? |
| 42 | + |
| 43 | +/// Path to the TLS private key for the client encoded in PEM format. |
| 44 | +tls_key: String? |
| 45 | + |
| 46 | +/// Send the specified TLS server name via SNI. |
| 47 | +tls_server_name: String? |
| 48 | + |
| 49 | +/// Insecure option to skip TLS server cert verification. |
| 50 | +/// |
| 51 | +/// Warning: it is insecure to enable this option. |
| 52 | +/// If enabled, crypto/tls accepts any certificate presented by the server and any host name in that certificate. |
| 53 | +/// |
| 54 | +/// Default: `false` |
| 55 | +insecure_skip_verify: Boolean? |
| 56 | + |
| 57 | +/// Send data to a [Coralogix](https://coralogix.com) server. |
| 58 | +coralogix: Coralogix? |
| 59 | + |
| 60 | +/// Set the compression method used to send data. |
| 61 | +/// |
| 62 | +/// Default: `"none"` |
| 63 | +compression: ("none"|"gzip")? |
| 64 | + |
| 65 | +/// Additional OpenTelemetry resource attributes |
| 66 | +attributes: Mapping<String,String>? |
| 67 | + |
| 68 | +/// Additional gRPC request metadata headers |
| 69 | +headers: Mapping<String,String>? |
| 70 | + |
| 71 | +class Coralogix { |
| 72 | + /// The private key, which can be found in Settings > Send Your Data. |
| 73 | + private_key: String |
| 74 | + |
| 75 | + /// The application name, which will be added to metric attributes. |
| 76 | + application: String |
| 77 | + |
| 78 | + /// The subsystem name, which will be added to metric attributes. |
| 79 | + subsystem: String |
| 80 | +} |
0 commit comments