Skip to content

Conversation

kga
Copy link
Member

@kga kga commented Sep 21, 2025

I added traces get command

mkr traces get --help
NAME:
   mkr traces get - get trace

USAGE:
   mkr traces get [command options] <traceId> [--jq <formula>]

DESCRIPTION:
   
    Get detailed trace information for the specified trace ID.
    Requests "GET /api/v0/traces/<traceId>". See https://mackerel.io/api-docs/entry/traces#get .


OPTIONS:
   --jq value  Filter response values using jq syntax

TODO

  • Remove replace directive in go.mod once mackerel-client-go traces support is officially released
  • Update to official mackerel-client-go version
  • Test with official release

kga added 4 commits September 21, 2025 12:09
- Add GetTrace method to mackerelclient.Client interface
- Add corresponding mock implementation in MockClient
- Supports trace retrieval functionality for upcoming traces command
- Add traces/command.go with CLI definition and subcommand routing
- Add traces/app.go with business logic for trace retrieval
- Add traces/app_test.go with unit tests using MockClient
- Support 'mkr traces get <traceId>' command with JSON output
- Include help text and argument validation
- Import traces package in commands.go
- Add traces.Command to Commands slice
- Enables 'mkr traces' command availability
- Add replace directive to use mackerel-client-go v0.37.4-0.20250921022114-01bdd54dfe06
- This commit references the traces branch of mackerel-client-go
- Update go.sum with new dependency checksums
- Required for GetTrace method availability until upstream merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant