Skip to content

[BUG] Can't query logs with OAuth #72

@bhrutledge

Description

@bhrutledge

Describe the bug

When I try any of the three methods for querying logs, I get an error that an endpoint doesn't support OAuth authentication. Other commands like go monitors list work as expected.

To Reproduce

% pup logs query --query="status:error env:prod" --from="1h"                                        
Error: endpoint POST /api/v2/logs/events does not support OAuth authentication. Please set DD_API_KEY and DD_APP_KEY environment variables

% pup logs list --query="status:error env:prod" --from="1h"
Error: endpoint POST /api/v2/logs/events does not support OAuth authentication. Please set DD_API_KEY and DD_APP_KEY environment variables

% pup logs search --query="status:error env:prod" --from="1h"
Error: endpoint POST /api/v2/logs/events/search does not support OAuth authentication. Please set DD_API_KEY and DD_APP_KEY environment variables

Expected behavior

I'd expect the query and list commands to work.

Environment

  • OS: macOS
  • Pup version: dev (via go install this morning)
  • Go version: 1.26.0
  • Authentication method: OAuth2

Command output

See above

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions