package
0.0.0-20240923130623-e3bad8cbee73
Repository: https://github.com/hduhelp/api_open_sdk.git
Documentation: pkg.go.dev
# Functions
NewConfig create a config.
Shutdown 优雅关闭,将OpenTelemetry SDK内存中的数据发送到服务端.
Start 初始化OpenTelemetry SDK,需要把 ${endpoint} 替换为实际的地址 如果填写为stdout则为调试默认,数据将打印到标准输出.
WithErrorHandler Configures a global error handler to be used throughout an OpenTelemetry instrumented project.
No description provided by the author
WithMetricExporterEndpoint configures the endpoint for sending metrics via OTLP 配置Metric的输出地址,如果配置为空则禁用Metric功能,配置为stdout则打印到标准输出用于测试.
WithMetricExporterInsecure permits connecting to the metric endpoint without a certificate 配置是否禁用SSL,如果输出到SLS,则必须打开SLS.
WithMetricReportingPeriod configures the metric reporting period, how often the controller collects and exports metric data.
WithResource configures attributes on the resource 配置上传附加的一些tag信息,例如环境、可用区等.
WithResourceAttributes configures attributes on the resource 配置上传附加的一些tag信息,例如环境、可用区等.
WithServiceName configures a "service.name" resource label 配置服务名称.
No description provided by the author
WithServiceVersion configures a "service.version" resource label 配置版本号.
WithSLSConfig configures sls project, instanceID, accessKeyID, accessKeySecret to send data to sls directly 配置输出到SLS的信息,包括 project, instanceID, accessKeyID, accessKeySecret.
WithTraceExporterEndpoint configures the endpoint for sending traces via OTLP 配置Trace的输出地址,如果配置为空则禁用Trace功能,配置为stdout则打印到标准输出用于测试.
WithTraceExporterInsecure permits connecting to the trace endpoint without a certificate 配置是否禁用SSL,如果输出到SLS,则必须打开SLS.
# Type aliases
Option configures the sls otel provider.