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

Fix SubmitDistributionPoints examples #2008

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

timlkelly
Copy link

@timlkelly timlkelly commented Sep 13, 2024

What does this PR do?

The Ruby examples to submit distribution metrics fail because the timestamp is not submitted as posix timestamp.

❯ ruby example.rb
/Users/tim/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/datadog_api_client-2.26.1/lib/datadog_api_client/api_client.rb:118:in `block in call_api': Error message: the server returns an error (DatadogAPIClient::APIError)
HTTP status code: 400
Response headers: {"date"=>["Fri, 13 Sep 2024 20:39:25 GMT"], "content-type"=>["text/plain; charset=utf-8"], "content-length"=>["98"], "connection"=>["close"], "x-content-type-options"=>["nosniff"], "strict-transport-security"=>["max-age=31536000; includeSubDomains; preload"]}
Response body: Payload is not in the expected format: json: cannot unmarshal string into Go value of type float64
        from /Users/tim/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/datadog_api_client-2.26.1/lib/datadog_api_client/api_client.rb:59:in `loop'
        from /Users/tim/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/datadog_api_client-2.26.1/lib/datadog_api_client/api_client.rb:59:in `call_api'
        from /Users/tim/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/datadog_api_client-2.26.1/lib/datadog_api_client/v1/api/metrics_api.rb:371:in `submit_distribution_points_with_http_info'
        from /Users/tim/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/datadog_api_client-2.26.1/lib/datadog_api_client/v1/api/metrics_api.rb:309:in `submit_distribution_points'
        from example.rb:32:in `<main>'

Additional Notes

Review checklist

Please check relevant items below:

  • This PR includes all newly recorded cassettes for any modified tests.

  • This PR does not rely on API client schema changes.

    • The CI should be fully passing.
  • Or, this PR relies on API schema changes and this is a Draft PR to include tests for that new functionality.

    • Note: CI shouldn't be run on this Draft PR, as its expected to fail without the corresponding schema changes.

@timlkelly timlkelly requested a review from a team as a code owner September 13, 2024 20:40
Copy link

This PR has been automatically marked as stale because it has not had activity in the last 30 days.
If there is no activity for another 90 days, this issue will be automatically closed.

@github-actions github-actions bot added the stale label Oct 15, 2024
@timlkelly
Copy link
Author

@amaskara-dd is this the best way to submit documentation feedback?

@github-actions github-actions bot removed the stale label Oct 16, 2024
Copy link

This PR has been automatically marked as stale because it has not had activity in the last 30 days.
If there is no activity for another 90 days, this issue will be automatically closed.

@github-actions github-actions bot added the stale label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant