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

DataDog Lambda Extension Integration - ERROR: invalid type: map, expected byte array #19658

Open
olsib opened this issue Jan 18, 2024 · 6 comments
Labels
source: new A request for a new source type: feature A value-adding code addition that introduce new functionality.

Comments

@olsib
Copy link

olsib commented Jan 18, 2024

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

Hello,

I'm trying to post logs/metrics from Lambda function to Vector Aggregator using DataDog lambda extension. This should be now supported see this

I get an error when i test this:

The error is:

024-01-16 15:26:14 UTC | DD_EXTENSION | DEBUG | The payload was not too big, returning the full payload
2024-01-16 15:26:14 UTC | DD_EXTENSION | DEBUG | The payload was not too big, returning the full payload
2024-01-16 15:26:14 UTC | DD_EXTENSION | INFO | Successfully posted payload to "https://vector-agg.test.com/api/v1/series", the agent will only log transaction success every 500 transactions
2024-01-16 15:26:14 UTC | DD_EXTENSION | DEBUG | SyncForwarder has flushed 1 transactions
2024-01-16 15:26:14 UTC | DD_EXTENSION | DEBUG | Demultiplexer: sendIterableSeries: stop routine
2024-01-16 15:26:14 UTC | DD_EXTENSION | WARN | failed to post http payload. code=400 host=vector-agg.test.com response=
{
    "code": 400,
    "message": "Error parsing JSON: Error("invalid type: map, expected byte array", line: 1, column: 12)"
}

Configuration

I'm injecting the Vector URL to the Lambda function as environment variable as below:

DD_VECTOR_LOGS_ENABLED    true
DD_VECTOR_LOGS_URL    https://vector-agg.test.com/
DD_VECTOR_METRICS_ENABLED    true
DD_VECTOR_METRICS_URL    https://vector-agg.test.com/

The lambda code I'm testing with is forked from here.

In Vector Aggregator there's a DataDog agent source configured as below that sinks to stdout:

  sources:
    datadog_agent:
      address: 0.0.0.0:8282
      type: datadog_agent
      multiple_outputs: true


### Version

vector 0.32.1 (x86_64-apple-darwin 9965884 2023-08-21 14:52:38.330227446)


### Additional Context

https://discord.com/channels/742820443487993987/1196848735188177087
@olsib olsib added the type: bug A code related bug. label Jan 18, 2024
@jszwedko jszwedko added type: feature A value-adding code addition that introduce new functionality. and removed type: bug A code related bug. labels Jan 18, 2024
@jszwedko
Copy link
Member

I changed this to a feature since the datadog_agent source wasn't designed to receive data from the Datadog Lambda Extension. Thanks for opening!

@jszwedko jszwedko added the source: new A request for a new source label Jan 18, 2024
@bharathiram
Copy link

Any update on this feature?

@bharathiram
Copy link

Is there a workaround solution for this error we can rely upon till we get the datadog_lambda_extension as a source?

@jszwedko
Copy link
Member

As a workaround, though I haven't tested this, I think you could likely use the http source to receive the log events and the datadog_agent source to receive metric events. The http source just doesn't do the same parsing of incoming payloads.

@mentos1386
Copy link

Hey all, any news on this? Is it still unsupported?

@jszwedko
Copy link
Member

Hey all, any news on this? Is it still unsupported?

It is still unsupported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source: new A request for a new source type: feature A value-adding code addition that introduce new functionality.
Projects
None yet
Development

No branches or pull requests

4 participants