@octaviaflow/telemetry-config-schema
v1.1.2
Published
Telemetry config schema for OctaviaFlow Telemetry
Maintainers
Readme
OctaviaFlow Telemetry Config Schema
Configuration file schema for OctaviaFlow Telemetry.
Installation
npm install @octaviaflow/telemetry-config-schemaUsage
Schema Validation
Add the YAML language server to your YAML files:
# yaml-language-server: $schema=https://unpkg.com/@octaviaflow/telemetry-config-schema@1/dist/config.schema.jsonSample Configuration
# yaml-language-server: $schema=https://unpkg.com/@octaviaflow/telemetry-config-schema@1/dist/config.schema.json
version: 1
projectId: 'my-awesome-project'
storage:
type: 'file'
file:
directory: './telemetry-logs'
fileNamePattern: 'octaviaflow-telemetry-{timestamp}.json'
maxFileSizeMB: 10
compress: false
collect:
npm:
dependencies:
jsx:
elements:
allowedAttributeNames:
- 'size'
- 'variant'
allowedAttributeStringValues:
- 'small'
- 'medium'
- 'large'
js:
tokens:
functions:
allowedArgumentStringValues:
- 'debug'
- 'info'
- 'warn'
- 'error'Storage Options
File Storage (Current)
Store telemetry data in JSON files that are MongoDB Atlas import-ready:
storage:
type: 'file'
file:
directory: './telemetry-logs'
fileNamePattern: 'octaviaflow-telemetry-{timestamp}.json'
maxFileSizeMB: 10
compress: falseMongoDB Storage (Future)
Direct MongoDB integration (coming soon):
storage:
type: 'mongodb'
mongodb:
connectionString: 'mongodb+srv://user:[email protected]'
database: 'telemetry'
collection: 'metrics'Schema Keys
| Key | Description | Required | Type |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------ |
| version | Current schema version. | Required | 1 |
| projectId | Unique identifier assigned on a per-project basis. | Required | String |
| storage | Storage configuration for telemetry data. | Required | Object |
| collect | Object containing one or more scopes for which to collect data. | Required | Object |
Collect Scopes
NPM Scope
Captures dependency information and package usage data.
JSX Scope
Captures React component usage and prop configurations.
JS Scope
Captures JavaScript function calls and token usage.
WC Scope
Captures Web Component usage and attribute configurations.
License
MIT
