Giter Site home page Giter Site logo

datadog / datadog-kafka-connect-logs Goto Github PK

View Code? Open in Web Editor NEW
6.0 236.0 11.0 425 KB

A plugin for Kafka Connect to send Kafka records as logs to Datadog.

Home Page: https://www.confluent.io/hub/datadog/kafka-connect-logs

License: Apache License 2.0

Java 100.00%
kafka-connect datadog datadog-logs datadog-api kafka kafka-consumer logs confluent confluent-kafka confluent-platform

datadog-kafka-connect-logs's Issues

Implement exactly-once support

Kafka Connect allows sink connectors to optionally implement exactly once behavior
by tracking in the external system the offsets for each topic partition. Most users
would prefer exactly once if given the choice, so where possible and where feasible
sink connectors should implement this behavior.
To handle exactly-once semantics for message delivery, the Source Connector must
correctly map the committed offsets to the Kafka cluster with some analog within
the source data system, and then handle the necessary rewinding should messages
need to be re-delivered. For example, consider a trivial Source connector that
publishes the lines from an input file to a Kafka topic one line at a time ... prefixed by
the line number. The commit* methods for that connector would save the line
number of the posted record ... and then pick up at that location upon a restart.

Hardcoded URL doesn't allow to send logs to different endpoint like EU

Describe what happened:
I am using this datadog kafka connector but my datadog system is operating in EU

Describe what you expected:
To be able to configure the URL from parameters in case a different URL than the US one is wanted to be used.

Steps to reproduce the issue:
Trying to send logs to the EU datadog endpoint

Additional environment details (Operating System, Cloud provider, etc):

Implement specialized logic for different HTTP error codes

The Logs Intake API returns different error codes for different situations:

413: For messages exceeding the 5MB limit
408: If the connection times out.

We should check if with some error codes, a simple retry is not the correct way to go and instead there could be logic to handle them better.

Truncate messages if compressed size exceeds 5MB

The Logs Intake API has a limit for the total size of a payload (5MB). We should figure out a logic to truncate those messages while retaining their JSON structure so they can be ingested properly.

Example of structure:

[
  {
    "ddsource": "kafka-connect",
    "message": "hello"
  },
  {
    "ddsource": "kafka-connect",
    "message": "world"
  }
]

Change HTTP Connection to open at startup and close on shutdown

Currently, the connector opens and closes an HTTP connection or every batch it sends. To reduce network load, we can change the logic to open a connection once and keep it alive until either:

a) The task stops
b) The connect worker stops

Special care needs to be given so that the connection is closed even in error states to avoid resource leaks.

bytes conversion to decimal type

We have kafka messages specified based on Avro schema. Some fields are defined as bytes but having Decimal as the logical type, like this:

{"name": "myField", "type": ["null", {"type": "bytes", "logicalType": "decimal", "precision": 11, "scale": 2}], "default": null, "doc": "BigDecimal with precision 11 scale 2"},

When messages imported into datadog as logs, it appears that myField are set as bytes instead of its logical type Decimal.

Am I missing some configuration, or is this currently not supported?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.