OtelDisGo
OtelDisGo is a DisGo handler middleware for OpenTelemetry. It provides a simple way to trace your DisGo commands.
Summary
- Getting Started
- Documentation
- Troubleshooting
- Contributing
- License
Getting Started
Installing
$ go get github.com/disgoorg/oteldisgo
Usage
Check https://opentelemetry.io/docs/languages/go/getting-started/ for more information on how to set up OpenTelemetry.
package main
import (
"github.com/disgoorg/disgo/handler"
"github.com/disgoorg/oteldisgo"
)
func main() {
r := handler.New()
r.Use(oteldisgo.Middleware("example"))
// handle commands as usual here
}
OTEL Tracing
OtelDisGo provides the following spans attributes:
- For All:
interaction.tye
- The type of the interaction
interaction.id
- The id of the interaction
interaction.application.id
- The id of the application
interaction.user.id
- The id of the user
interaction.channel.id
- The id of the channel
interaction.guild.id
- The id of the guild (if applicable)
interaction.createdat
- The time the interaction was created
- Application Command Interaction
interaction.command.id
- The id of the command
interaction.command.name
- The name of the command
interaction.command.guild.id
- The guild id of the command (if applicable)
- Slash Command Interaction
interaction.command.subcommand
- The subcommand of the command
interaction.command.subcommandgroup
- The subcommand group of the command
interaction.command.path
- The full path of the command
- User Command Interaction
interaction.command.user.id
- The id of the user who the command was used on
- Message Command Interaction
interaction.command.message.id
- The id of the message the command was used on
- AutoComplete Interaction
interaction.command.id
- The id of the command
interaction.command.name
- The name of the command
interaction.command.subcommand
- The subcommand of the command
interaction.command.subcommandgroup
- The subcommand group of the command
interaction.command.path
- The full path of the command
interaction.command.guild.id
- The guild id of the command (if applicable)
- Component Interaction
interaction.component.type
- The type of the component
interaction.component.customid
- The custom id of the component
- Modal Interaction
interaction.component.customid
- The custom id of the modal
Documentation
Documentation can be found under
Troubleshooting
For help feel free to open an issue or reach out on Discord
Contributing
Contributions are welcomed but for bigger changes we recommend first reaching out via Discord or create an issue to discuss your problems, intentions and ideas.
License
Distributed under the . See LICENSE for more information.
Supported by Jetbrains