Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize specification related to OTLP file exporter #3031

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed specification/logs/img/otlp-file.png
Binary file not shown.
21 changes: 0 additions & 21 deletions specification/logs/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
+ [Export](#export)
+ [ForceFlush](#forceflush-2)
+ [Shutdown](#shutdown-1)
* [Built-in exporters](#built-in-exporters)
+ [OTLP Exporter](#otlp-exporter)
+ [OTLP File exporter](#otlp-file-exporter)

<!-- tocstop -->

Expand Down Expand Up @@ -365,21 +362,3 @@ return a Failure result.
`Shutdown` SHOULD NOT block indefinitely (e.g. if it attempts to flush the data
and the destination is unavailable). [OpenTelemetry SDK](../overview.md#sdk)
authors MAY decide if they want to make the shutdown timeout configurable.

### Built-in exporters

TODO: Break out into files under `./sdk_exporters`.

#### OTLP Exporter

Exports to an OTLP network destination via OTLP/gRPC or OTLP/HTTP.

#### OTLP File exporter

Writes to a file or stdout in either OTLP JSON or OTLP Protobuf binary format.

![Logging to File](img/otlp-file.png)
tigrannajaryan marked this conversation as resolved.
Show resolved Hide resolved

TODO: clarify how this functionality co-exists with the overlapping
functionality in logging libraries that allow specifying how logs are written to
a file.
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# JSON File serialization
# OpenTelemetry Protocol File Exporter

**Status**: [Experimental](../../specification/document-status.md)

This document provides a placeholder for specifying an OTLP exporter capable of
exporting to either a file or stdout.

Currently, it only describes the serialization of OpenTelemetry data to the OTLP JSON format.

## Table of Contents

- [Overview](#overview)
- [Requirements](#requirements)
- [JSON File serialization](#json-file-serialization)
- [File storage requirements](#file-storage-requirements)
- [JSON lines file](#json-lines-file)
- [Streaming appending](#streaming-appending)
- [Telemetry data requirements](#telemetry-data-requirements)
- [Examples](#examples)
- [Examples](#examples)

## Overview
## JSON File serialization

This document describes the serialization of OpenTelemetry data as JSON objects that can be stored in files.

## Requirements

### File storage requirements

#### JSON lines file
Expand All @@ -33,7 +35,7 @@ This file is a JSON lines file (jsonlines.org), and therefore follows those requ

There is no guarantee that the data in the file is ordered.

There is no guarantee in particular that timestamps will be monotically increasing.
There is no guarantee in particular that timestamps will be monotonically increasing.

### Telemetry data requirements

Expand All @@ -46,7 +48,7 @@ Only top-level objects, `ExportTraceServiceRequest`, `ExportMetricsServiceReques

Files must contain exactly one type of data: traces, metrics, or logs.

## Examples
### Examples

This is an example showing traces:

Expand Down