metric

command module
v0.0.0-...-ecda40b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

README

OTLP Metric Exporter Sample App

This sample application exports 1 count metric, 1 sum metric and 1 histogram metric via OTLP metric exporter. It can be configured to export to either Datadog Agent OTLP metric intake or OpenTelemtry Collector OTLP receiver.

Usage

go build .
./metric [http | grpc] [endpoint] [delta | cumulative]

All arguments are optional.

  • The 1st arg specifies which protocol to use, default is gRPC.
  • The 2nd arg specifies the metric intake endpoint. Default is localhost:4317 for gRPC and localhost:4318 for HTTP.
  • The 3rd arg specifies the metric aggregation temporality, default is cumulative.

Documentation

Overview

Package main provides a code sample of using otlpmetric exporter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL