Skip to content

Commit

Permalink
Publish Apache Druid input source skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
arusevm committed Oct 8, 2024
1 parent 7c0ba96 commit a97e825
Show file tree
Hide file tree
Showing 24 changed files with 1,824 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,24 @@ Parquet files as saved by this Stand-alone server.
- [README](./server-parquet)
- [Javadoc on javadoc.io](https://javadoc.io/doc/io.mishmash.opentelemetry/server-parquet)

## Apache Druid Input Format

Use this artifact when ingesting OpenTelemetry signals into [Apache Druid](https://druid.apache.org), in combination with an Input Source (like Apache Kafka or other).

Apache Druid is a high performance, real-time analytics database that delivers sub-second queries on streaming and batch data at scale and under load. This makes it perfect for OpenTelemetry data analytics.

With this OTLP Input Format you can build OpenTelemetry ingestion pipelines into Apache
Druid. For example:
- Use the [OpenTelemetry Kafka Exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/kafkaexporter/README.md) to publish
OTLP signals to an Apache Kafka topic, then the [Druid Kafka Ingestion](https://druid.apache.org/docs/latest/ingestion/kafka-ingestion/) with this Input Format to get Druid
tables with your telemetry.
- In a similar way you can also use other Druid input sources developed by mishmash io -
like with [Apache BookKeeper](https://bookkeeper.apache.org) or [Apache Pulsar](https://pulsar.apache.org). For details - check the related artifact documentation.

Find out more about the OTLP Input Format for Apache Druid:
- [README](./druid-input-format)
- [Javadoc on javadoc.io](https://javadoc.io/doc/io.mishmash.opentelemetry/druid-input-format)

# OpenTelemetry at mishmash io

OpenTelemetry's main intent is the observability of production environments, but at [mishmash io](https://mishmash.io) it is part of our software development process. By saving telemetry from **experiments** and **tests** of
Expand All @@ -44,4 +62,3 @@ We believe that adopting OpenTelemetry as a software development tool might be u

Learn more about the broader set of [OpenTelemetry-related activities](https://mishmash.io/open_source/opentelemetry) at
[mishmash io](https://mishmash.io/) and `follow` [GitHub profile](https://github.com/mishmash-io) for updates and new releases.

Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,60 @@ public LogsFlattener(
uuid = UUID.randomUUID().toString();
}

/**
* Get the configured Logs {@link Batch}, if any.
*
* @return the batch or null if not set
*/
public Batch<Log> getBatch() {
return batch;
}

/**
* Get the own telemetry context, if any.
*
* @return the {@link Context} or null if not set
*/
public Context getOtel() {
return otel;
}

/**
* Get the parsed protobuf Logs request.
*
* @return the {@link ExportLogsServiceRequest} message
*/
public ExportLogsServiceRequest getRequest() {
return request;
}

/**
* Get the authenticated user who submitted this message.
*
* @return the {@link User} or null if authentication was not enabled
*/
public User getUser() {
return user;
}

/**
* Get the timestamp used by this flattener.
*
* @return the timestamp in milliseconds
*/
public long getTimestamp() {
return timestamp;
}

/**
* Get the unique UUID used by this flattener.
*
* @return the UUID
*/
public String getUuid() {
return uuid;
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,60 @@ public MetricsFlattener(
uuid = UUID.randomUUID().toString();
}

/**
* Get the configured Metrics {@link Batch}, if any.
*
* @return the batch or null if not set
*/
public Batch<MetricDataPoint> getBatch() {
return batch;
}

/**
* Get the own telemetry context, if any.
*
* @return the {@link Context} or null if not set
*/
public Context getOtel() {
return otel;
}

/**
* Get the parsed protobuf Metrics request.
*
* @return the {@link ExportMetricsServiceRequest} message
*/
public ExportMetricsServiceRequest getRequest() {
return request;
}

/**
* Get the authenticated user who submitted this message.
*
* @return the {@link User} or null if authentication was not enabled
*/
public User getUser() {
return user;
}

/**
* Get the timestamp used by this flattener.
*
* @return the timestamp in milliseconds
*/
public long getTimestamp() {
return timestamp;
}

/**
* Get the unique UUID used by this flattener.
*
* @return the UUID
*/
public String getUuid() {
return uuid;
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,60 @@ public ProfilesFlattener(
uuid = UUID.randomUUID().toString();
}

/**
* Get the configured Profiles {@link Batch}, if any.
*
* @return the batch or null if not set
*/
public Batch<ProfileSampleValue> getBatch() {
return batch;
}

/**
* Get the own telemetry context, if any.
*
* @return the {@link Context} or null if not set
*/
public Context getOtel() {
return otel;
}

/**
* Get the parsed protobuf Profiles request.
*
* @return the {@link ExportProfilesServiceRequest} message
*/
public ExportProfilesServiceRequest getRequest() {
return request;
}

/**
* Get the authenticated user who submitted this message.
*
* @return the {@link User} or null if authentication was not enabled
*/
public User getUser() {
return user;
}

/**
* Get the timestamp used by this flattener.
*
* @return the timestamp in milliseconds
*/
public long getTimestamp() {
return timestamp;
}

/**
* Get the unique UUID used by this flattener.
*
* @return the UUID
*/
public String getUuid() {
return uuid;
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,60 @@ public TracesFlattener(
uuid = UUID.randomUUID().toString();
}

/**
* Get the configured Spans {@link Batch}, if any.
*
* @return the batch or null if not set
*/
public Batch<Span> getBatch() {
return batch;
}

/**
* Get the own telemetry context, if any.
*
* @return the {@link Context} or null if not set
*/
public Context getOtel() {
return otel;
}

/**
* Get the parsed protobuf Traces request.
*
* @return the {@link ExportTraceServiceRequest} message
*/
public ExportTraceServiceRequest getRequest() {
return request;
}

/**
* Get the authenticated user who submitted this message.
*
* @return the {@link User} or null if authentication was not enabled
*/
public User getUser() {
return user;
}

/**
* Get the timestamp used by this flattener.
*
* @return the timestamp in milliseconds
*/
public long getTimestamp() {
return timestamp;
}

/**
* Get the unique UUID used by this flattener.
*
* @return the UUID
*/
public String getUuid() {
return uuid;
}

/**
* {@inheritDoc}
*/
Expand Down
3 changes: 3 additions & 0 deletions druid-input-format/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Apache Druid Input Format for OpenTelemetry singals

Coming soon!
119 changes: 119 additions & 0 deletions druid-input-format/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2024 Mishmash IO UK Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.mishmash.opentelemetry</groupId>
<artifactId>opentelemetry-server-embedded</artifactId>
<version>1.1.3</version>
</parent>

<artifactId>druid-input-format</artifactId>
<packaging>jar</packaging>

<name>An OpenTelemetry InputFormat for Apache Druid Data Sources</name>
<description>
An OpenTelemetry input format that can be used to build Apache Druid data ingestion jobs.
</description>
<url>https://mishmash.io/open_source/opentelemetry</url>

<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>

<organization>
<name>mishmash io</name>
<url>https://mishmash.io</url>
</organization>

<scm>
<connection>scm:git:https://github.com/mishmash-io/opentelemetry-server-embedded.git</connection>
<developerConnection>scm:git:https://github.com/mishmash-io/opentelemetry-server-embedded.git</developerConnection>
<url>https://github.com/mishmash-io/opentelemetry-server-embedded</url>
</scm>

<developers>
<developer>
<name>Ivan Kountchev</name>
<email>[email protected]</email>
<organization>mishmash io</organization>
<organizationUrl>https://mishmash.io</organizationUrl>
<roles>
<role>developer</role>
</roles>
</developer>
<developer>
<name>Andrey Rusev</name>
<email>[email protected]</email>
<url>www.linkedin.com/in/andrey-rusev-21894172</url>
<organization>mishmash io</organization>
<organizationUrl>https://mishmash.io</organizationUrl>
<roles>
<role>architect</role>
</roles>
</developer>
</developers>

<properties>
<druid.version>30.0.1</druid.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>io.mishmash.opentelemetry</groupId>
<artifactId>collector-embedded</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.mishmash.opentelemetry</groupId>
<artifactId>persistence-protobuf</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.druid</groupId>
<artifactId>druid-processing</artifactId>
<version>${druid.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

</project>
Loading

0 comments on commit a97e825

Please sign in to comment.