Last updated: July 5, 2026
Create Pull Requests
Agent0 generates pull requests for infrastructure-as-code configurations, instrumentation improvements, and code-level fixes identified during investigations. Agent0 creates the changes, writes a description of the issue, includes evidence from the investigation, and raises the PR in GitHub for review.
How It Works
Agent0 analyzes your request and investigation findings, then automatically:
- Generates the necessary code or configuration changes
- Creates a detailed PR description with context and evidence
- Includes investigation findings, telemetry screenshots, and rationale
- References related issues or incidents if applicable
- Raises the PR in your GitHub repository for team review
- Validates that changes follow established patterns and conventions
The PR is reviewable like any other code change, enabling your standard approval and testing workflows before merging.
Creating pull requests requires the GitHub connector to be configured. See Connect to GitHub for setup instructions.
Generate Pull Requests
Request a pull request after creating infrastructure-as-code or identifying a code-level fix:
Example prompts:
- "Raise this Terraform configuration as a pull request"
- "Create a PR to add these resource attributes to the service"
- "Generate a pull request to fix the missing trace correlation"
- "Raise a PR to improve the OpenTelemetry configuration"
- "Create a pull request with this dashboard IaC"
- "Submit a PR to add the service.namespace attribute"
Specify the target repository and branch if you have multiple repositories configured. If you don't specify, Agent0 will use the default repository from your GitHub connector configuration.
Types of Pull Requests
Agent0 generates pull requests for several categories:
- Infrastructure-as-code — Terraform configurations for dashboards and alerts
- Kubernetes manifests — Perses dashboards and check rule custom resources
- Instrumentation fixes — Missing resource attributes, span conventions, correlation IDs
- OpenTelemetry configuration — Sampler settings, processor pipelines, exporter configurations
- Service metadata — Service names, versions, environment labels
- Code-level fixes — Issues identified during root cause analysis
Review the Pull Request Details
Before raising the PR, Agent0 shows you:
- Files changed — The specific files and modifications included
- Description — Context about why the change is needed
- Investigation evidence — Telemetry screenshots, error logs, trace examples
- Target repository — Where the PR will be created
- Branch strategy — Base branch and proposed feature branch name
Example PR description generated by Agent0:
1234567891011121314151617181920## Add service.namespace attribute to frontend service### ProblemThe frontend service is missing the `service.namespace` attribute, whichprevents proper correlation with Kubernetes resources and makes it harderto filter traces by environment.### Evidence- Service appears as "frontend" without namespace qualification- Unable to filter by namespace in service map- Related services in the "production" namespace show proper correlation### Changes- Added `service.namespace=production` to OTEL_RESOURCE_ATTRIBUTES- Updated deployment manifest with environment variable- Follows semantic convention v1.24.0### Testing- Verified resource attributes appear in spans after restart- Confirmed service map now shows namespace grouping
Refine Before Raising
If the PR needs adjustments before creation, iterate with Agent0:
- "Change the target branch to develop"
- "Add a link to the incident in the description"
- "Include the error rate graph in the PR description"
- "Split this into two PRs, one for each service"
- "Add a comment explaining why this threshold was chosen"
Raise the Pull Request
Once satisfied with the changes, confirm with Agent0 to raise the PR:
- "Raise this PR"
- "Create the pull request"
- "Submit this to GitHub"
Agent0 creates the PR and provides a direct link:
PR #1234: Add service.namespace attribute to frontend service https://github.com/your-org/your-repo/pull/1234
The PR follows your team's review process — assign reviewers, run CI checks, and merge when approved.
Instrumentation Pull Requests
Agent0 reviews your service's OpenTelemetry configuration against established patterns and identifies gaps:
- Missing or incorrect service names
- Incomplete resource attributes
- Missing span conventions
- Log and trace correlation identifiers not configured
- Sampling configuration issues
Agent0 generates the instrumentation code or configuration to close these gaps and raises it as a pull request:
Common instrumentation improvements:
- Adding
service.name,service.namespace,service.version - Configuring
deployment.environmentattribute - Setting up trace-log correlation with
trace_idandspan_id - Fixing span naming to follow semantic conventions
- Adding custom resource attributes for domain context
Further Reading
- About Agent0 — Overview of the AI layer built into Dash0
- Connect to GitHub — Set up the GitHub connector for PR creation
- Create Infrastructure as Code — Generate IaC configurations for dashboards and alerts
- Investigation & Analysis — Root cause analysis that leads to code fixes
