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

[GEN-2222]: add instrumentation-rule for code attributes #2239

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

BenElferink
Copy link
Contributor

Following-up with a UI update in response to PR #2230


This pull request introduces the CodeAttributes feature to the instrumentation rules in the frontend. The changes span across multiple files, including model definitions, GraphQL schema, service functions, and the web application interface. The most important changes are summarized below:

Model and Schema Updates:

  • Added CodeAttributes and CodeAttributesInput types to the models_gen.go file and integrated them into the InstrumentationRule and InstrumentationRuleInput structs. [1] [2] [3]
  • Updated the GraphQL schema to include CodeAttributes and CodeAttributesInput in the InstrumentationRule and InstrumentationRuleInput types. [1] [2] [3]

Service Layer Changes:

  • Modified the ListInstrumentationRules, UpdateInstrumentationRule, and CreateInstrumentationRule functions to handle the new CodeAttributes field. [1] [2] [3] [4] [5] [6]

Web Application Updates:

  • Added a new CodeAttributesIcon component and exported it for use in the application. [1] [2]
  • Updated the ActionModal component to autofocus only when no action type is selected.
  • Enhanced the build-drawer-item function to include codeAttributes in the drawer item construction. [1] [2]
  • Introduced a new CodeAttributes component for the rule form body, allowing users to select which code attributes to collect. [1] [2] [3]
  • Fixed an issue in the PayloadCollection component to handle cases where payloadCollection might be undefined.
  • Updated the RuleModal component to start with no pre-selected rule option.

Copy link

@BenElferink BenElferink added enhancement New feature or request frontend labels Jan 16, 2025
@BenElferink BenElferink requested review from blumamir and alonkeyval and removed request for blumamir January 16, 2025 09:26
import { SVG } from '@/assets';
import theme from '@/styles/theme';

export const CodeAttributesIcon: SVG = ({ size = 16, fill = theme.text.info, rotate = 0, onClick }) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did this icon come from?

Copy link
Contributor Author

@BenElferink BenElferink Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Figma under "Design System" ---> icons
This one:

Screenshot 2025-01-16 at 15 21 07

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants