Help us shape the future of Go! Take the 2026 Go Developer Survey

telemetry

package
v0.10.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const FingerprintFile = ".vaultmind/fingerprint.txt"

FingerprintFile is the relative path within a vault where the anonymous per-vault identifier lives.

Variables

This section is empty.

Functions

func EnsureFingerprint

func EnsureFingerprint(vaultPath string) (string, error)

EnsureFingerprint returns the vault's anonymous fingerprint, creating it on first call. The fingerprint is a 128-bit random hex string stored at <vaultPath>/.vaultmind/fingerprint.txt. It is NOT derivable from vault content — it's a stable, opaque identifier the federated telemetry pipeline uses to group records by vault without learning anything about the vault's contents or the user's filesystem.

The fingerprint is per-vault, not per-machine. If a vault is shared across machines (committed to git), all machines contribute under the same fingerprint. The vault's default .gitignore leaves this file committable. If the user wants per-machine fingerprints, they should ignore .vaultmind/fingerprint.txt — the default behavior is "vault carries its own identity."

The file is created with mode 0o600 to keep curious file-system scanners from picking it up casually; it's not a secret, but it's also not meant to be world-readable.

Types

type Features

type Features struct {
	NoteCount        int            `json:"note_count"`
	TypeDistribution map[string]int `json:"type_distribution"`
	LinkCount        int            `json:"link_count"`
	AliasCount       int            `json:"alias_count"`
	EmbeddingCount   int            `json:"embedding_count"`
	EmbeddingDims    int            `json:"embedding_dims"`
}

Features captures aggregate, content-free statistics about a vault. These are the per-vault descriptors a federated telemetry pipeline uses to predict where population-tuned constants will and won't generalize (cf. the federated-paper design note H2.3).

Nothing in here exposes content. Counts and a per-type distribution are aggregate enough to share even at the strictest privacy tier.

func ComputeFeatures

func ComputeFeatures(indexDBPath string) (*Features, error)

ComputeFeatures opens the vault's index DB read-only and returns the aggregate features. Returns an error if the index doesn't exist or can't be queried — callers should run `vaultmind index --vault <path>` before computing features for a freshly-initialized vault.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL