Languages & SDKs
You don't need a custom SDK to use Unblind. You can use the standard OpenTelemetry libraries for your programming language.
Before you can make requests to the Unblind API, you will need to grab your API key. You can create one in Settings.
Configuration
To integrate your language SDK with Unblind, you'll need these configuration values:
| Setting | Value |
|---|---|
| Endpoint | https://otlp.unblind.dev |
| Protocol | HTTP/Protobuf |
| Header | Authorization: Bearer <API_KEY> |
Setup Steps
- Select your language: Visit the OpenTelemetry Instrumentation docs to find the SDK for your language (Node, Python, Go, Java, Rust, etc.).
- Configure the Exporter: When initializing the SDK, configure the OTLP Exporter using the endpoint and headers found in the configuration table above.
Example using Typescript OpenTelemetry Stack
import { OTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-proto";
import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-proto";
import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions";
import { resourceFromAttributes } from "@opentelemetry/resources";
const exporterConfig = {
url: "https://otlp.unblind.dev",
headers: {
"Content-Type": "application/x-protobuf",
"Authorization: Bearer": "<API_KEY>",
}
};
// Resource configuration
const resource = resourceFromAttributes({
[ATTR_SERVICE_NAME]: "custom-service",
"tenant.id": "acme-inc",
});
const sdk = new NodeSDK({
resource,
metricReaders: [
new PeriodicExportingMetricReader({
exporter: new OTLPMetricExporter(cfg),
}),
],
logRecordProcessors: [
new BatchLogRecordProcessor(new OTLPLogExporter(cfg), {
maxQueueSize: 10000,
}),
],
instrumentations: [getNodeAutoInstrumentations()],
});
sdk.start();
Identifying Tenants
Unblind isolates data into per-tenant datasets by detecting the tenant.id attribute in your telemetry data. The Unblind data pipeline then strips this value internally and uses it to determine which tenant each piece of telemetry belongs to.
The attribute can be set at the Resource level (recommended for resources owned by the tenant) or the Attribute level (useful for multi-tenant scenarios). If both are present, the Attribute-level identifier takes precedence.
import { resourceFromAttributes } from "@opentelemetry/resources";
// Applies to all telemetry sent from this instance
const resource = resourceFromAttributes({
"service.name": "<SERVICE_NAME>",
"tenant.id": "<TENANT_ID>",
});