Sqlite exporter for the OpenTelemetry Collector
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Go to file
William Perron 5308d82844
change migrate name to avoid conflict (maybe)
10 months ago
internal copyright and remove test db 10 months ago
migrations add instrumentation library to spans table 10 months ago
testdata basic structure 1 year ago
.gitignore polish Makefile 10 months ago
LICENSE copyright and remove test db 10 months ago
Makefile polish Makefile 10 months ago
README.md improve README 10 months ago
builder-config.yaml add local build and run configs 10 months ago
config.go polish Makefile 10 months ago
config_test.go copyright and remove test db 10 months ago
doc.go copyright and remove test db 10 months ago
factory.go change migrate name to avoid conflict (maybe) 10 months ago
factory_test.go add instrumentation library to spans table 10 months ago
go.mod add instrumentation library to spans table 10 months ago
go.sum add instrumentation library to spans table 10 months ago
otelcol-dev-config.yaml add local build and run configs 10 months ago
sqlite_exporter.go add instrumentation library to spans table 10 months ago
sqlite_exporter_test.go add instrumentation library to spans table 10 months ago

README.md

sqliteexporter

Sqlite exporter for the OpenTelemetry Collector and OpenTelemetry Go.

Note that this is an alpha release, tables and column names may change in the future. golang-migrate is used to manage updates to the database schema.

Configuration Options

  • path [no default]: Path to the Sqlite database file. If the file does not exist, it will be created on startup.

Example

exporters:
  sqlite:
    path: local.db

Tables

Currently, this exporter creates 3 tables to store trace span data:

  • spans: Each individual spans
  • events: Span events, with a span_id to JOIN with the spans table
  • links: Span links, with a parent_span_id to JOIN with the spans table

The Resource and Instrumentation Library are inlined in the spans table. This creates some duplication but makes the schema much easier to navigate and query. Attributes are inlined as JSON-encoded string and can be queried using Sqlite's JSON functions and operators.

Note on JSONB data type

Sqlite recently added support for the JSONB data type which improves performance on JSON-encoded data. Support for this feature is planned for the future.