O
Octyra
DocsIntegrationsSDK Integration

SDK Integration

For deep insights into your application's performance, use our language-specific SDKs.

Supported Languages

LanguagePackageDocumentation
Pythonoctyra-sdkPython SDK Docs
Gogithub.com/octyra/octyra-goGo SDK Docs
Node.js@octyra/sdkNode.js SDK Docs
Javacom.octyra:octyra-sdkJava SDK Docs
Rubyoctyra-sdkRuby SDK Docs
.NETOctyra.SDK.NET SDK Docs

Python Example

python
from octyra import Octyra, trace

# Initialize the SDK
octyra = Octyra(
    api_key="YOUR_API_KEY",
    service_name="my-service",
    environment="production"
)

# Automatic instrumentation
octyra.instrument_flask()

# Manual instrumentation
@trace
def process_order(order_id):
    octyra.add_span_attribute("order_id", order_id)
    return result

# Custom metrics
octyra.metric("orders_processed", 1, tags={"status": "success"})

Go Example

go
package main

import (
    "github.com/octyra/octyra-go"
)

func main() {
    client, err := octyra.New(octyra.Config{
        APIKey:      "YOUR_API_KEY",
        ServiceName: "my-service",
        Environment: "production",
    })
    if err != nil {
        log.Fatal(err)
    }
    defer client.Close()

    ctx, span := client.StartSpan(context.Background(), "process_order")
    defer span.End()

    span.SetAttribute("order_id", "12345")
    client.Metric("orders_processed", 1, map[string]string{"status": "success"})
}