instana-go-client

module
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0

README

Instana Go Client Library

Go Version License Build Status

A comprehensive Go client library for the Instana API. This library provides a clean, idiomatic Go interface for interacting with Instana's monitoring and observability platform.

Installation

go get github.com/instana/instana-go-client

Quick Start

Configuration Methods
1. Simple Client Creation

    // Create client with basic configuration
    api := instana.NewInstanaAPIWithUserAgent(
        "your-api-token",
        "your-tenant.instana.io",
        false, // skipTlsVerification
        "terraform/6.0.0",
    )
    
    // Use the client...
    channel, err := api.AlertingChannels().GetOne("id")

    if err != nil {
        log.Fatal(err)
    }
    
    fmt.Printf("Channel Name: %s\n", channel.Name)

2. Builder Pattern
    config, err := config.NewConfigBuilder().
        WithBaseURL("https://tenant-unit.instana.io").
        WithAPIToken("your-api-token").
        WithConnectionTimeout(45 * time.Second).
        WithRequestTimeout(90 * time.Second).
        WithMaxRetryAttempts(5).
        WithRetryInitialDelay(2 * time.Second).
        WithRateLimitRequestsPerSecond(50).
        WithCustomHeader("X-Custom-Header", "value").
        WithDebug(true).
        Build()

    if err != nil {
        log.Fatal(err)
    }

    api, err := instana.NewInstanaAPIWithConfig(config)
    if err != nil {
        log.Fatal(err)
    }

    channel, err := api.AlertingChannels().GetOne("id")
    if err != nil {
        log.Fatal(err)
    }

    fmt.Printf("Channel Name: %s\n", channel.Name)

Examples

See the examples directory for complete examples:

Support

Changelog

See CHANGELOG.md for version history and changes.


Directories

Path Synopsis
Package instana provides a Go client library for the Instana API.
Package instana provides a Go client library for the Instana API.
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
shared

Jump to

Keyboard shortcuts

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