文档

Golang探针兼容性要求

更新时间:

本文列出了Golang应用监控对操作系统和架构的要求,以及支持的第三方组件和框架。

操作系统要求

编译工具名

操作系统

架构

instgo_linux_amd64

Linux

amd64

instgo_linux_arm64

Linux

arm64

instgo_darwin_amd64

Darwin

amd64

instgo_darwin_arm64

Darwin

arm64

instgo_windows_amd64.exe

Windows

amd64

支持的Golang版本

1.18及以上版本

支持的插件版本

消息

组件

仓库地址

低版本

高版本

AMQP

https://github.com/rabbitmq/amqp091-go

v1.9.0

v1.10.0

Segmentio Kafka

https://github.com/segmentio/kafka-go

v0.4.10

v0.4.48

RocketMQ Client Go

https://github.com/apache/rocketmq-client-go

v2.1.0

v2.1.2

RocketMQ Client

https://github.com/apache/rocketmq-clients/tree/master/golang

v5.0.0

v5.1.1

IBM Sarama

https://github.com/IBM/sarama

v1.40.0

v1.43.3

Shopify Sarama

https://github.com/IBM/sarama

v1.22.0

v.1.38.1

RPC框架

组件

仓库地址

低版本

高版本

Dubbo

https://github.com/apache/dubbo-go

v3.0.1

v3.1.0

Echo

https://github.com/labstack/echo

v4.0.0

v4.12.0

FastHTTP

https://github.com/valyala/fasthttp

v1.45.0

v1.55.0

Fiber

https://github.com/gofiber/fiber

v2.43.0

v2.52.5

Gin

https://github.com/gin-gonic/gin

v1.7.0

v1.10.0

Go Micro

https://github.com/go-micro/go-micro

v4.9.0

v5.3.1

Go Restful

https://github.com/emicklei/go-restful

v3.7.0

v3.12.0

Go Zero

https://github.com/zeromicro/go-zero

v1.5.0

v1.7.0

gRPC

https://github.com/grpc/grpc-go

v1.44.0

v1.66.0

Iris

https://github.com/kataras/iris

v12.0.0

v12.2.11

Kitex

https://github.com/cloudwego/kitex

v0.5.1

v0.10.0

Kratos

https://github.com/go-kratos/kratos

v2.5.2

v2.7.3

Mux

https://github.com/gorilla/mux

v1.3.0

v1.8.1

Net/HTTP

https://pkg.go.dev/net/http

v1.18

v1.23

Thrift

https://github.com/apache/thrift/tree/master/lib/go

v0.19.0

v0.20.0

Hertz

https://github.com/cloudwego/hertz

v0.8.0

v0.9.2

SQL/NOSQL

组件

仓库地址

低版本

高版本

Go Elasticsearch

https://github.com/elastic/go-elasticsearch

v8.0.0

v8.15.0

Go Redis

https://github.com/redis/go-redis

v8.11.0

v9.5.1

Go SQL Driver

https://github.com/go-sql-driver/mysql

v1.4.0

v1.7.1

Gorm

https://github.com/go-gorm/gorm

v1.22.0

v1.25.9

GORM MySQL

https://github.com/go-gorm/mysql

v1.1.3

v1.5.4

Go标准库MySQL

https://pkg.go.dev/database/sql

v1.18

v1.21

Mongo

https://github.com/mongodb/mongo-go-driver

v1.11.1

v1.11.7

Redis Go

https://github.com/gomodule/redigo

v1.9.0

v1.9.2

日志

组件

仓库地址

低版本

高版本

Zerolog

https://github.com/rs/zerolog

v1.10.0

v1.33.0

Zap

https://github.com/uber-go/zap

v1.20.0

v1.27.0

Logrus

https://github.com/sirupsen/logrus

v1.5.0

v1.9.3

Log

https://pkg.go.dev/log

v1.18

v1.23

Slog

https://pkg.go.dev/log/slog

v1.18

v1.23

Trace SDK

组件

仓库地址

低版本

高版本

OpenTracing

https://github.com/opentracing/opentracing-go

v1.1.0

v1.2.0

OTel SDK

https://github.com/open-telemetry/opentelemetry-go

v1.6.0

v1.30.0

其他SDK

组件

仓库地址

低版本

高版本

FC Go SDK

https://github.com/aliyun/fc-runtime-go-sdk

v0.2.9

v0.2.10

常见问题

为什么使用消息框架时存在断链?

受限于消息框架的具体实现,当前版本的Golang探针对某些消息框架的Trace上下文传递存在一定限制,具体如下:

组件

仓库地址

Producer

Consumer

AMQP

https://github.com/rabbitmq/amqp091-go

无限制。

仅统计Receive Span,基于消息内容调用下游产生的Span无法与Receive Span串联。

Segmentio Kafka

https://github.com/segmentio/kafka-go

无限制。

仅统计Receive Span,基于消息内容调用下游产生的Span无法与Receive Span串联。

Shopify Sarama

https://github.com/IBM/sarama

使用AsyncProducer时,Publish Span无法与所属调用的Span串联。

仅统计Receive Span,基于消息内容调用下游产生的Span无法与Receive Span串联。

IBM Sarama

https://github.com/IBM/sarama

使用AsyncProducer时,Publish Span无法与所属调用的Span串联。

仅统计Receive Span,基于消息内容调用下游产生的Span无法与Receive Span串联。

RocketMQ Client Go

https://github.com/apache/rocketmq-client-go

无限制。

  • 仅支持PushConsumer。

  • 对于一次性消费多条消息,且消费中存在调用下游的情况,调用下游的Span都会被挂到这一批消费的最后一条下面(一次消费单条消息则不存在该问题)。

RocketMQ Client

https://github.com/apache/rocketmq-clients/tree/master/golang

无限制。

仅统计Receive Span,基于消息内容调用下游产生的Span无法与Receive Span串联。