Files
sdk/docs/MetricsAPI.md
zeekay ac25f74c85 the module path carries /v8, so its tags are releases
Go's semantic import versioning gives a path without a /vN suffix exactly two
publishable major versions: v0 and v1. This client rides the shared 8.5.x line,
so at the bare path every tag it cut was unpublishable -- v8.5.89 and v8.5.156
both sat on the repo while proxy.golang.org served v1.0.5 and always would. A
tag the proxy rejects is not a release, it is a decoration.

The host half does NOT move. hanzoai/go-sdk is the path already on the proxy and
pkg.go.dev, and renaming it would strand every existing import; adding the
suffix does not, because v1 consumers keep resolving v1.0.5 at the old path.
That is what the suffix is for.

The generator writes the same path into 2,272 doc references, so sdks.yaml's
git-repo-id carries it too -- otherwise the next regeneration would tell readers
to import a path whose 8.x tags the proxy refuses. And the release workflow now
READS the path from go.mod instead of restating it: one spelling, in the file
that defines it, so the warm step cannot go on asking for a path nobody
publishes.
2026-08-28 11:17:09 -07:00

14 KiB

\MetricsAPI

All URIs are relative to https://api.hanzo.ai

Method HTTP request Description
GetMetricsHealth Get /v1/metrics/health How many metric series this deployment holds for your org
GetMetricsLogsHealth Get /v1/metrics/logs/health How many log records this deployment holds for your org
GetMetricsLogsQuery Get /v1/metrics/logs/query Search your org's logs by label, time and substring
GetMetricsQuery Get /v1/metrics/query Read your org's series back over a time range
GetMetricsTracesHealth Get /v1/metrics/traces/health How many spans this deployment holds for your org
GetMetricsTracesQuery Get /v1/metrics/traces/query Recent spans for your org over a time range
GetMetricsTracesTrace Get /v1/metrics/traces/trace Every span of one trace — the waterfall
PostMetricsBatch Post /v1/metrics/batch Ingest a MetricBatch — the same payload the ZAP transport carries
PostMetricsLogsWrite Post /v1/metrics/logs/write Append structured log records for your org
PostMetricsTracesWrite Post /v1/metrics/traces/write Append spans for your org
PostMetricsWrite Post /v1/metrics/write Append samples to your org's named, labelled series

GetMetricsHealth

GetMetricsHealth(ctx).Execute()

How many metric series this deployment holds for your org

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MetricsAPI.GetMetricsHealth(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MetricsAPI.GetMetricsHealth``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetMetricsHealthRequest struct via the builder pattern

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetMetricsLogsHealth

GetMetricsLogsHealth(ctx).Execute()

How many log records this deployment holds for your org

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MetricsAPI.GetMetricsLogsHealth(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MetricsAPI.GetMetricsLogsHealth``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetMetricsLogsHealthRequest struct via the builder pattern

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetMetricsLogsQuery

GetMetricsLogsQuery(ctx).Execute()

Search your org's logs by label, time and substring

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MetricsAPI.GetMetricsLogsQuery(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MetricsAPI.GetMetricsLogsQuery``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetMetricsLogsQueryRequest struct via the builder pattern

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetMetricsQuery

GetMetricsQuery(ctx).Execute()

Read your org's series back over a time range

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MetricsAPI.GetMetricsQuery(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MetricsAPI.GetMetricsQuery``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetMetricsQueryRequest struct via the builder pattern

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetMetricsTracesHealth

GetMetricsTracesHealth(ctx).Execute()

How many spans this deployment holds for your org

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MetricsAPI.GetMetricsTracesHealth(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MetricsAPI.GetMetricsTracesHealth``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetMetricsTracesHealthRequest struct via the builder pattern

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetMetricsTracesQuery

GetMetricsTracesQuery(ctx).Execute()

Recent spans for your org over a time range

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MetricsAPI.GetMetricsTracesQuery(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MetricsAPI.GetMetricsTracesQuery``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetMetricsTracesQueryRequest struct via the builder pattern

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetMetricsTracesTrace

GetMetricsTracesTrace(ctx).Execute()

Every span of one trace — the waterfall

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MetricsAPI.GetMetricsTracesTrace(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MetricsAPI.GetMetricsTracesTrace``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetMetricsTracesTraceRequest struct via the builder pattern

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostMetricsBatch

PostMetricsBatch(ctx).Execute()

Ingest a MetricBatch — the same payload the ZAP transport carries

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MetricsAPI.PostMetricsBatch(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MetricsAPI.PostMetricsBatch``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiPostMetricsBatchRequest struct via the builder pattern

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostMetricsLogsWrite

PostMetricsLogsWrite(ctx).Execute()

Append structured log records for your org

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MetricsAPI.PostMetricsLogsWrite(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MetricsAPI.PostMetricsLogsWrite``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiPostMetricsLogsWriteRequest struct via the builder pattern

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostMetricsTracesWrite

PostMetricsTracesWrite(ctx).Execute()

Append spans for your org

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MetricsAPI.PostMetricsTracesWrite(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MetricsAPI.PostMetricsTracesWrite``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiPostMetricsTracesWriteRequest struct via the builder pattern

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostMetricsWrite

PostMetricsWrite(ctx).Execute()

Append samples to your org's named, labelled series

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.MetricsAPI.PostMetricsWrite(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MetricsAPI.PostMetricsWrite``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiPostMetricsWriteRequest struct via the builder pattern

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]