Annotation Builder
Constructor#
import "github.com/perses/perses/go-sdk/annotation"
var options []annotation.Option
annotation.New("Deployments", options...)Need to provide the name of the annotation and a list of options.
Default options#
- Name(): with the name provided in the constructor.
Available options#
Name#
annotation.Name("Deployments")Sets the annotation display name.
Description#
annotation.Description("Production deployments")Sets the annotation description.
Hidden#
annotation.Hidden(true)Controls whether the annotation is initially hidden.
Color#
annotation.Color("#ff0000")Sets the annotation display color.
Plugin#
annotation.Plugin(plugin.Plugin{Kind: "PrometheusAnnotation", Spec: spec})Sets the annotation plugin configuration. An annotation plugin SDK returns an annotation.Option that sets this field.
Annotation Plugin Options#
See the related documentation for each annotation plugin.
Example#
dashboard.AddAnnotation("Deployments",
annotationPlugin(),
annotation.Description("Production deployments"),
annotation.Color("#ff0000"),
)
