OpenTelemetry

Most recent version: v0.0.1

See the changelog of this Sink here.

Overview

The OpenTelemetry Data sink allows Onum to send data in OpenTelemetry Protocol, including Metrics, Traces, and Logs.

Configuration

Now you need to specify how and where to send the data, and how to establish a connection with your database.

Metadata

Enter the basic information for the new Data sink.

Parameters
Description

Name*

Enter a name for the new Data sink.

Description

Optionally, enter a description for the Data sink.

Tags

Add tags to easily identify your Data sink. Hit the Enter key after you define each tag.


Metrics

Decide whether or not to include this Data sink info in the metrics and graphs of the Home area.

Configuration

Now add the configuration to establish the connection.

Parameter
Description

Protocol*

Choose the desired protocol to send your data:

  • gRPC

  • HTTP

Endpoint*

Enter the endpoint to send your data e.g. otel-collector.mycompany.com:4317

Port*

Specify the required port.

Use gzip Compression

Set this option to true if you want to compress your data in gzip format.

Send timeout in ms

Set the milliseconds to wait for data to be successfully transmitted before terminating the attempt.

Send Traces*

Set this option to true if you want to send Traces to your OpenTelemetry account. If you select the HTTP sending protocol, you'll be prompted to optionally include your HTTP Traces Path.

Send Metrics*

Set this option to true if you want to send Metrics to your OpenTelemetry account. If you select the HTTP sending protocol, you'll be prompted to optionally include your HTTP Metrics Path.

Send Logs*

Set this option to true if you want to send Logs to your OpenTelemetry account. If you select the HTTP sending protocol, you'll be prompted to optionally include your HTTP Logs Path.

Depending on the type(s) of data you're sending (Traces, Metrics, and/or Logs), your events must have a specific set of information in OpenTelemetry format. Check an example for every data type below:

Traces
{
  "resourceSpans": [
    {
      "resource": {
        "attributes": [
          {
            "key": "service.name",
            "value": {
              "stringValue": "my.service"
            }
          }
        ]
      },
      "scopeSpans": [
        {
          "scope": {
            "name": "my.library",
            "version": "1.0.0",
            "attributes": [
              {
                "key": "my.scope.attribute",
                "value": {
                  "stringValue": "some scope attribute"
                }
              }
            ]
          },
          "spans": [
            {
              "traceId": "5B8EFFF798038103D269B633813FC60C",
              "spanId": "EEE19B7EC3C1B174",
              "parentSpanId": "EEE19B7EC3C1B173",
              "name": "I'm a server span",
              "startTimeUnixNano": "1544712660000000000",
              "endTimeUnixNano": "1544712661000000000",
              "kind": 2,
              "attributes": [
                {
                  "key": "my.span.attr",
                  "value": {
                    "stringValue": "some value"
                  }
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
Metrics
{
  "resourceMetrics": [
    {
      "resource": {
        "attributes": [
          {
            "key": "service.name",
            "value": {
              "stringValue": "my.service"
            }
          }
        ]
      },
      "scopeMetrics": [
        {
          "scope": {
            "name": "my.library",
            "version": "1.0.0",
            "attributes": [
              {
                "key": "my.scope.attribute",
                "value": {
                  "stringValue": "some scope attribute"
                }
              }
            ]
          },
          "metrics": [
            {
              "name": "my.counter",
              "unit": "1",
              "description": "I am a Counter",
              "sum": {
                "aggregationTemporality": 1,
                "isMonotonic": true,
                "dataPoints": [
                  {
                    "asDouble": 5,
                    "startTimeUnixNano": "1544712660300000000",
                    "timeUnixNano": "1544712660300000000",
                    "attributes": [
                      {
                        "key": "my.counter.attr",
                        "value": {
                          "stringValue": "some value"
                        }
                      }
                    ]
                  }
                ]
              }
            },
            {
              "name": "my.gauge",
              "unit": "1",
              "description": "I am a Gauge",
              "gauge": {
                "dataPoints": [
                  {
                    "asDouble": 10,
                    "timeUnixNano": "1544712660300000000",
                    "attributes": [
                      {
                        "key": "my.gauge.attr",
                        "value": {
                          "stringValue": "some value"
                        }
                      }
                    ]
                  }
                ]
              }
            },
            {
              "name": "my.histogram",
              "unit": "1",
              "description": "I am a Histogram",
              "histogram": {
                "aggregationTemporality": 1,
                "dataPoints": [
                  {
                    "startTimeUnixNano": "1544712660300000000",
                    "timeUnixNano": "1544712660300000000",
                    "count": 2,
                    "sum": 2,
                    "bucketCounts": [1,1],
                    "explicitBounds": [1],
                    "min": 0,
                    "max": 2,
                    "attributes": [
                      {
                        "key": "my.histogram.attr",
                        "value": {
                          "stringValue": "some value"
                        }
                      }
                    ]
                  }
                ]
              }
            },
            {
              "name": "my.exponential.histogram",
              "unit": "1",
              "description": "I am an Exponential Histogram",
              "exponentialHistogram": {
                "aggregationTemporality": 1,
                "dataPoints": [
                  {
                    "startTimeUnixNano": "1544712660300000000",
                    "timeUnixNano": "1544712660300000000",
                    "count": 3,
                    "sum": 10,
                    "scale": 0,
                    "zeroCount": 1,
                    "positive": {
                      "offset": 1,
                      "bucketCounts": [0,2]
                    },
                    "min": 0,
                    "max": 5,
                    "zeroThreshold": 0,
                    "attributes": [
                      {
                        "key": "my.exponential.histogram.attr",
                        "value": {
                          "stringValue": "some value"
                        }
                      }
                    ]
                  }
                ]
              }
            }
          ]
        }
      ]
    }
  ]
}
Logs
{
  "resourceLogs": [
    {
      "resource": {
        "attributes": [
          {
            "key": "service.name",
            "value": {
              "stringValue": "my.service"
            }
          }
        ]
      },
      "scopeLogs": [
        {
          "scope": {
            "name": "my.library",
            "version": "1.0.0",
            "attributes": [
              {
                "key": "my.scope.attribute",
                "value": {
                  "stringValue": "some scope attribute"
                }
              }
            ]
          },
          "logRecords": [
            {
              "timeUnixNano": "1544712660300000000",
              "observedTimeUnixNano": "1544712660300000000",
              "severityNumber": 10,
              "severityText": "Information",
              "traceId": "5B8EFFF798038103D269B633813FC60C",
              "spanId": "EEE19B7EC3C1B174",
              "body": {
                "stringValue": "Example log record"
              },
              "attributes": [
                {
                  "key": "string.attribute",
                  "value": {
                    "stringValue": "some string"
                  }
                },
                {
                  "key": "boolean.attribute",
                  "value": {
                    "boolValue": true
                  }
                },
                {
                  "key": "int.attribute",
                  "value": {
                    "intValue": "10"
                  }
                },
                {
                  "key": "double.attribute",
                  "value": {
                    "doubleValue": 637.704
                  }
                },
                {
                  "key": "array.attribute",
                  "value": {
                    "arrayValue": {
                      "values": [
                        {
                          "stringValue": "many"
                        },
                        {
                          "stringValue": "values"
                        }
                      ]
                    }
                  }
                },
                {
                  "key": "map.attribute",
                  "value": {
                    "kvlistValue": {
                      "values": [
                        {
                          "key": "some.map.key",
                          "value": {
                            "stringValue": "some value"
                          }
                        }
                      ]
                    }
                  }
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Batch Configuration

Set this option to true and fill the following options to establish batch configuration:

Parameters
Description

Minimum amount of data points to be sent

Set the minimum amount of data points used to send the batch. Does not establish a real maximum, just a trigger. The default value is 8192.

Sizer*

Decide whether to set the limit in bytes or items.

Minimum size of the batch

Set the minimum capacity of the batch.

Max size of the batch

Set the maximum capacity of the batch. It must be higher than the minimum set above. The default value is 0 and there's not a maximum limit.

Time in milliseconds (ms) to send the batch

Enter the timeout to send the batch in milliseconds. The default value is 200 ms.

TLS Configuration

Set this option to true and fill the following options to allow TLS configuration:

Parameters
Description

Certificate*

This is the predefined TLS certificate.

Private Key*

The private key of the corresponding certificate.

CA Chain*

The path containing the CA certificate

Minimum TLS Version*

Minimum TLS version to use for your connection.

Authentication Configuration

Choose the authentication configuration for your request:

Parameters
Description

None

Choose this option if you don't need any authentication.

Basic

Enter your credentials for basic authentication:

  • Username*

  • Password*

Bearer Token

Enter your token information:

  • Token Name*

  • Token*

Test Configuration

Parameters
Description

Wait for result

Select true to test the connection to the destination by waiting for a response from the server.

Click Finish when complete.

Last updated

Was this helpful?