utility

package
v1.50.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package utility provides utility functions for the snowflakeexporter package to consolidate code

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertAttributesToString

func ConvertAttributesToString(m pcommon.Map, logger *zap.Logger) string

ConvertAttributesToString converts the pcommon.Map into a JSON string representation this is due to a bug/lacking feature with the snowflake driver that prevents maps from being inserted into VARIANT & OBJECT columns github issue: https://github.com/snowflakedb/gosnowflake/issues/217

func FlattenExemplars

func FlattenExemplars(exemplars pmetric.ExemplarSlice) (Array, Array, Array, Array, Array)

FlattenExemplars will flatten the given exemplars into slices of the individual fields

func SpanIDToHexOrEmptyString

func SpanIDToHexOrEmptyString(id pcommon.SpanID) string

SpanIDToHexOrEmptyString returns a string representation of the SpanID in hex Same implementation as "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/traceutil"

func TraceIDToHexOrEmptyString

func TraceIDToHexOrEmptyString(id pcommon.TraceID) string

TraceIDToHexOrEmptyString returns a string representation of the TraceID in hex Same implementation as "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/traceutil"

Types

type Array

type Array []any

Array implements driver.Valuer interface allowing arrays to be sent to Snowflake

func (Array) Value

func (a Array) Value() (driver.Value, error)

Value marshals the underlying array and then casts to a string value so it can be viewed in Snowflake

Jump to

Keyboard shortcuts

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