Getting started with Uptrace

Get started

Getting started with Uptrace and OpenTelemetry is easy:

  1. You can host Uptrace on your servers or create a cloud account. Either way, you will obtain a DSN which contains Uptrace connection details, for example, https://secret@api.uptrace.dev?grpc=4317.
  2. To start receiving telemetry data, use the DSN to configure OpenTelemetry for your programming language.

Have questions? Get help via Telegram, Slack, or start a discussion on GitHub.

Hosted

There are several Uptrace editions with different features that you can host on your servers.

  • Community Edition is a free version of Uptrace with limited functionality and no support.
  • Premium Edition costs $200 a month and provides full functionality with basic support via GitHub issues.
  • Managed Edition costs $1000 a month and is fully managed by Uptrace team. The support is provided 16/5 via Slack, Telegram, or emails.
FeatureCommunityPremiumManaged
Project management via UI✔️✔️
Per-project data retention✔️✔️
Role-based access control✔️✔️
Single Sign-On using OIDC and SAML✔️✔️
Two-factor authentication✔️✔️
High-availability setup✔️✔️
Managed by Uptrace✔️

To learn more, feel free to contact support or schedule a call.

Infrastructure monitoring

To monitor host (infrastructure) metrics, Redis, PostgreSQL, MySQL and many more, use OpenTelemetry Collector.

If you are using AWS, you can also send CloudWatch Metrics directly to Uptrace.

Logs monitoring

To monitor logs, you can use Vector and FluentBit integrations.

If you are using AWS, you can also send CloudWatch Logs directly to Uptrace.

DSN

Uptrace DSN (Data Source Name) is a connection string that is used to connect and send data to an Uptrace backend. It contains a backend address (host:port) and a secret token that grants access to a project.

For example, the DSN http://project1_secret_token@localhost:14318?grpc=14317 contains the following information:

  • http tells the client to disable TLS. Use https to enable TLS.
  • localhost:14317 is an address of the Uptrace backend. The cloud version always uses the api.uptrace.dev address without a port.
  • project1_secret_token is a secret token that is used for authentication.
  • ?grpc=14318 is a GRPC port for OpenTelemetry protocol.

You can find your project DSN on the Project Settings page:

Resource attributes

Resource attributes are key-value pairs that provide metadata about the monitored entity, such as a service, process, or container. They help identify the resource and provide additional information that can be used to filter and group telemetry data.

AttributeComment
service.nameLogical name of the service. Uptrace provides an overview of all services.
service.versionThe version string of the service API or implementation.
deployment.environmentName of the deployment environment (aka deployment tier). Uptrace can group spans from different environments separately.
host.nameName of the host. Usually, resource detectors discover and set this attribute automatically.

You can set those attributes by using the env resource detector and providing the OTEL_RESOURCE_ATTRIBUTES environment variable:

shell
export OTEL_RESOURCE_ATTRIBUTES=service.name=myservice,service.version=1.0.0,deployment.environment=production

Or you can configure them during OpenTelemetry initialization:

go Go
// https://uptrace.dev/get/opentelemetry-go

import (
    "github.com/uptrace/uptrace-go/uptrace"
    "go.opentelemetry.io/otel/attribute"
)

uptrace.ConfigureOpentelemetry(
    // copy your project DSN here or use UPTRACE_DSN env var
    //uptrace.WithDSN("<FIXME>"),

    uptrace.WithServiceName("myservice"),
    uptrace.WithServiceVersion("v1.0.0"),
    uptrace.WithResourceAttributes(
        attribute.String("deployment.environment", "production"),
    ),
)
python Python
# https://uptrace.dev/get/opentelemetry-python

import uptrace

# copy your project DSN here or use UPTRACE_DSN env var
uptrace.configure_opentelemetry(
  dsn="<FIXME>",
  service_name="myservice",
  service_version="1.0.0",
  resource_attributes={"deployment.environment": "production"},
)
ruby Ruby
# https://uptrace.dev/get/opentelemetry-ruby

require 'uptrace'

# copy your project DSN here or use UPTRACE_DSN env var
Uptrace.configure_opentelemetry(dsn: '<FIXME>') do |c|
  # c is OpenTelemetry::SDK::Configurator
  c.service_name = 'myservice'
  c.service_version = '1.0.0'

  c.resource = OpenTelemetry::SDK::Resources::Resource.create(
    'deployment.environment' => 'production'
  )
end
js JavaScript
// https://uptrace.dev/get/opentelemetry-js/node

const uptrace = require('@uptrace/node')

uptrace
  .configureOpentelemetry({
    // copy your project DSN here or use UPTRACE_DSN env var
    //dsn: '<FIXME>',
    serviceName: 'myservice',
    serviceVersion: '1.0.0',
    resourceAttributes: { 'deployment.environment': 'production' },
  })
  // Start OpenTelemetry SDK.
  .start()
  // Then execute the main function when SDK is ready.
  .then(main)
php PHP
// https://uptrace.dev/get/opentelemetry-php

$uptrace = Uptrace\Distro::builder()
    // copy your project DSN here or use UPTRACE_DSN env var
    //->setDsn('<FIXME>')
    ->setServiceName('myservice')
    ->setServiceVersion('1.0.0')
    ->setResourceAttributes(['deployment.environment' => 'production'])
    ->buildAndRegisterGlobal();