Skip to content

Filter out some workflows/jobs #68

Open
@fbarbare

Description

@fbarbare

This integartion sends quite a lot of spans to Sentry and we would like to reduce it to not go over the quota that we're paying for. In order to do that, we would like to disable this integration for some of the workflows/jobs that we have since they are not critical and quite basic. Some only run for a few seconds.

I think we could include some configuration in the sentry_config.ini so that we can include/exclude some workflows.

I was thinking that we could have a structure that would look like this in JSON:

{
  "dsn": "https://[email protected]/foobar",
  "include_workflows": [
    {"repo": "repo-1", "workflow": "workflow1.yml"},
    {"repo": "repo-2", "workflow": "workflow1.yml"}
  ],
  "exclude_workflows": [
    {"repo": "repo-1", "workflow": "workflow2.yml"},
    {"repo": "repo-2", "workflow": "workflow2.yml"}
  ]
}

which seem to look like this in .ini file (might be wrong, I don't know much about those):

dsn=https://[email protected]/foobar
include_workflows[]={"repo":"repo-1","workflow":"workflow1.yml"}
include_workflows[]={"repo":"repo-2","workflow":"workflow1.yml"}
exclude_workflows[]={"repo":"repo-1","workflow":"workflow2.yml"}
exclude_workflows[]={"repo":"repo-2","workflow":"workflow2.yml"}

I could work on something like that and submit a PR. What are your thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions