Conversation
This was referenced Mar 3, 2026
Jez-A
commented
Mar 3, 2026
Jez-A
commented
Mar 3, 2026
Adds OpenTelemetry observability URL helpers that mirror Opsbox::OpenTelemetry. Provides Grafana Tempo trace URLs, local Jaeger URLs (dev/development), and Kibana Discover log URLs — all returning nil gracefully when OTEL is unconfigured. Adds opentelemetry_api ~> 1.4 and jason ~> 1.4 dependencies. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
f1ce788 to
6d6528f
Compare
Contributor
Author
|
Manually tested and led to the creation, transition, and commenting of https://zigroup.atlassian.net/browse/SS-136 |
Parallactic-Prancer
approved these changes
Mar 9, 2026
Jaeger is not available locally. generate_trace_url/0 now returns nil for non-production/sandbox environments instead of a localhost Jaeger URL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds two new utility modules required by the AutoEscalation feature: - Zexbox.JiraClient: Req-based client for the Jira Cloud REST API v3. Supports search, create, transition, and add_comment operations. Authenticates via JIRA_USER_EMAIL_ADDRESS / JIRA_API_TOKEN env vars or :jira_email / :jira_api_token application config. - Zexbox.OpenTelemetry: Reads the current process OTEL context (baggage and active span) to produce Datadog session, Grafana Tempo trace, and Kibana Discover URLs. Returns nil gracefully when OTEL is unconfigured. Adds :req, :jason, and :opentelemetry_api dependencies to mix.exs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…uests search_latest_issues was using GET with query params, which means the response body was not guaranteed to be JSON-decoded by Req (Req only auto-decodes based on the response Content-Type, not the request method). Two changes: - search_latest_issues now uses POST /rest/api/3/search/jql with a JSON body — the preferred Jira v3 approach. This also allows fields to be sent as a proper JSON array rather than a comma-separated string. - build_client adds Accept: application/json to every request so the remaining GET (transitions fetch) also explicitly signals JSON intent and Req's decode_body step has a clear content-type to act on. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces keyword list opts (Keyword.fetch!/get) with typed positional
arguments throughout, consistent with the rest of the repo's style:
search_latest_issues(jql, project_key \\ nil)
create_issue(project_key, summary, description, issuetype, priority, custom_fields \\ %{})
transition_issue(issue_key, status_name)
add_comment(issue_key, comment)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
49ed703 to
8d02399
Compare
More idiomatic code paths
- Extract post_comment/2 so add_comment/2 is a clean public one-liner - Remove leading pipe antipattern in create_issue/6 - Extract browse_url/1 to deduplicate base_url config lookups - Extract handle_response/1 to unify jira_get/jira_post response handling - Replace `|| ""` nil guard with to_string/1 in matches_status?/2 - Switch search_latest_issues to GET /issue/search with list fields param Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Parallactic-Prancer
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a port of the Jira client we currently have in Opsbox: https://github.com/Intellection/opsbox/blob/master/lib/opsbox/jira_client.rb
PR: #55 adds the OpenTelemetry URL helpers this stack depends on. Merge first.
PR: #54 adds the AdfBuilder which builds Atlassian Document Format (ADF) maps for Jira issue descriptions and comments. Stacked on this PR.
PR: #52 adds the public entry point to handling errors (AutoEscalation). Stacked on #54.
The planned merge order is 55, then 53 (this PR), then 54, then 52.
Changes
Zexbox.JiraClient: Req-based HTTP client for the Jira Cloud REST API v3 (search issues, create issue, transition, add comment):reqdependencyThis module is the infrastructure layer for the AutoEscalation feature (see follow-up PRs).
Stacked on: #55
Test plan
mix test test/zexbox/jira_client_test.exs— 10 tests covering all four public JiraClient functionsmix test— full suite green🤖 Generated with Claude Code