Learn R Programming

bidux (version 0.4.0)

detect_otel_json: Detect if JSON file contains OTLP (OpenTelemetry Protocol) data

Description

Checks if a JSON file contains OpenTelemetry Protocol span data by looking for the characteristic OTLP structure (resourceSpans, scopeSpans, spans).

Usage

detect_otel_json(source_path)

Value

Logical TRUE if OTLP format detected, FALSE otherwise

Arguments

source_path

Path to JSON file

Examples

Run this code
if (FALSE) {
detect_otel_json("spans.json") # returns TRUE for otlp files
detect_otel_json("telemetry.json") # returns FALSE for shiny.telemetry files
}

Run the code above in your browser using DataLab