Пример #1
0
from sentry import analytics


class ReleaseCreatedEvent(analytics.Event):
    type = "release.created"

    attributes = (
        analytics.Attribute("user_id", required=False),
        analytics.Attribute("organization_id"),
        analytics.Attribute("project_ids"),
        analytics.Attribute("user_agent", required=False),
        analytics.Attribute("created_status"),
    )


analytics.register(ReleaseCreatedEvent)
Пример #2
0
from __future__ import absolute_import

from sentry import analytics


class TeamCreatedEvent(analytics.Event):
    type = 'team.created'

    attributes = (
        analytics.Attribute('user_id', required=False),
        analytics.Attribute('default_user_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('team_id'),
    )


analytics.register(TeamCreatedEvent)
Пример #3
0
from __future__ import absolute_import

from sentry import analytics


class SecondPlatformAddedEvent(analytics.Event):
    type = 'second_platform.added'

    attributes = (
        analytics.Attribute('user_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('project_id'),
        analytics.Attribute('platform', required=False),
    )


analytics.register(SecondPlatformAddedEvent)
Пример #4
0
from sentry import analytics


class FirstEventSentEvent(analytics.Event):
    type = "first_event.sent"

    attributes = (
        analytics.Attribute("user_id"),
        analytics.Attribute("organization_id"),
        analytics.Attribute("project_id"),
        analytics.Attribute("platform", required=False),
    )


analytics.register(FirstEventSentEvent)
Пример #5
0
from __future__ import absolute_import, print_function

from sentry import analytics


class IntegrationPipelineStep(analytics.Event):
    type = "integrations.pipeline_step"

    attributes = (
        analytics.Attribute("user_id"),
        analytics.Attribute("organization_id"),
        analytics.Attribute("integration"),
        analytics.Attribute("step_index"),
        analytics.Attribute("pipeline_type"),
    )


analytics.register(IntegrationPipelineStep)
Пример #6
0
from __future__ import absolute_import

from sentry import analytics


class IssueAlertFiredEvent(analytics.Event):
    type = "issue_alert.fired"

    attributes = (
        analytics.Attribute("issue_id"),
        analytics.Attribute("project_id"),
        analytics.Attribute("organization_id"),
        analytics.Attribute("rule_id"),
    )


analytics.register(IssueAlertFiredEvent)
Пример #7
0
class IntegrationResolveCommitEvent(analytics.Event):
    type = 'integration.resolve.commit'

    attributes = (
        analytics.Attribute('provider'),
        analytics.Attribute('id'),
        analytics.Attribute('organization_id'),
    )


class IntegrationResolvePREvent(analytics.Event):
    type = 'integration.resolve.pr'

    attributes = (
        analytics.Attribute('provider'),
        analytics.Attribute('id'),
        analytics.Attribute('organization_id'),
    )


analytics.register(IntegrationAddedEvent)
analytics.register(IntegrationIssueCreatedEvent)
analytics.register(IntegrationIssueLinkedEvent)
analytics.register(IntegrationIssueStatusSyncedEvent)
analytics.register(IntegrationIssueAssigneeSyncedEvent)
analytics.register(IntegrationIssueCommentsSyncedEvent)
analytics.register(IntegrationRepoAddedEvent)
analytics.register(IntegrationResolveCommitEvent)
analytics.register(IntegrationResolvePREvent)
Пример #8
0
from __future__ import absolute_import

from sentry import analytics


class SentryAppInstalledEvent(analytics.Event):
    type = 'sentry_app.installed'

    attributes = (
        analytics.Attribute('user_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('sentry_app'),
    )


analytics.register(SentryAppInstalledEvent)
Пример #9
0
from __future__ import absolute_import

from sentry import analytics


class IssueAssignedEvent(analytics.Event):
    type = 'issue.assigned'

    attributes = (
        analytics.Attribute('user_id', required=False),
        analytics.Attribute('default_user_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('group_id'),
    )


analytics.register(IssueAssignedEvent)
Пример #10
0
from __future__ import absolute_import

from sentry import analytics


class ProjectCreatedEvent(analytics.Event):
    type = 'project.created'

    attributes = (
        analytics.Attribute('user_id', required=False),
        analytics.Attribute('default_user_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('project_id'),
        analytics.Attribute('platform', required=False),
    )


analytics.register(ProjectCreatedEvent)
Пример #11
0
from __future__ import absolute_import

from sentry import analytics


class SearchSavedEvent(analytics.Event):
    type = 'search.saved'

    attributes = (
        analytics.Attribute('user_id', required=False),
        analytics.Attribute('default_user_id'),
        analytics.Attribute('project_id'),
        analytics.Attribute('organization_id'),
    )


analytics.register(SearchSavedEvent)
Пример #12
0
from __future__ import absolute_import, print_function

from sentry import analytics


class OrganizationSavedSearchCreatedEvent(analytics.Event):
    type = 'organization_saved_search.created'

    attributes = (
        analytics.Attribute('org_id'),
        analytics.Attribute('search_type'),
        analytics.Attribute('query'),
    )


class OrganizationSavedSearchDeletedEvent(analytics.Event):
    type = 'organization_saved_search.deleted'

    attributes = (
        analytics.Attribute('org_id'),
        analytics.Attribute('search_type'),
        analytics.Attribute('query'),
    )


analytics.register(OrganizationSavedSearchCreatedEvent)
analytics.register(OrganizationSavedSearchDeletedEvent)
Пример #13
0
from __future__ import absolute_import, print_function

from sentry import analytics


class MemberInvitedEvent(analytics.Event):
    type = 'member.invited'

    attributes = (
        analytics.Attribute('inviter_user_id'),
        analytics.Attribute('invited_member_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('referrer', required=False),
    )


analytics.register(MemberInvitedEvent)
Пример #14
0
from __future__ import absolute_import

from sentry import analytics


class SentryAppUpdatedEvent(analytics.Event):
    type = 'sentry_app.updated'

    attributes = (
        analytics.Attribute('user_id'),
        analytics.Attribute('sentry_app'),
    )


analytics.register(SentryAppUpdatedEvent)
Пример #15
0
from __future__ import absolute_import

from sentry import analytics


class IssueTrackerUsedEvent(analytics.Event):
    type = 'issue_tracker.used'

    attributes = (
        analytics.Attribute('user_id', required=False),
        analytics.Attribute('default_user_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('issue_tracker'),
        analytics.Attribute('project_id'),
    )


analytics.register(IssueTrackerUsedEvent)
Пример #16
0
from __future__ import absolute_import, print_function

from sentry import analytics


class SlackIntegrationAssign(analytics.Event):
    type = 'integrations.slack.assign'

    attributes = (
        analytics.Attribute('actor_id', required=False),
    )


class SlackIntegrationStatus(analytics.Event):
    type = 'integrations.slack.status'

    attributes = (
        analytics.Attribute('status'),
        analytics.Attribute('resolve_type', required=False),
        analytics.Attribute('actor_id', required=False),
    )


analytics.register(SlackIntegrationAssign)
analytics.register(SlackIntegrationStatus)
Пример #17
0
from __future__ import absolute_import

from sentry import analytics


class InboxInEvent(analytics.Event):
    type = "inbox.issue_in"

    attributes = (
        analytics.Attribute("user_id", type=int, required=False),
        analytics.Attribute("default_user_id", type=int),
        analytics.Attribute("organization_id", type=int),
        analytics.Attribute("group_id"),
        analytics.Attribute("reason"),
    )


analytics.register(InboxInEvent)
Пример #18
0
from __future__ import absolute_import

from sentry import analytics


class SentryAppTokenExchangedEvent(analytics.Event):
    type = 'sentry_app.token_exchanged'

    attributes = (
        analytics.Attribute('sentry_app_installation_id'),
        analytics.Attribute('exchange_type'),
    )


analytics.register(SentryAppTokenExchangedEvent)
Пример #19
0
import abc

from sentry import analytics


class InAppRequestSentEvent(analytics.Event, abc.ABC):
    attributes = [
        analytics.Attribute("organization_id"),
        analytics.Attribute("user_id", required=False),
        analytics.Attribute("target_user_id"),
        analytics.Attribute("providers"),
        analytics.Attribute("subtype", required=False),
    ]


class InviteOrJoinRequest(InAppRequestSentEvent, abc.ABC):
    attributes = InAppRequestSentEvent.attributes + [analytics.Attribute("invited_member_id")]


class InviteRequestSentEvent(InviteOrJoinRequest):
    type = "invite_request.sent"


class JoinRequestSentEvent(InviteOrJoinRequest):
    type = "join_request.sent"


analytics.register(InviteRequestSentEvent)
analytics.register(JoinRequestSentEvent)
Пример #20
0
from __future__ import absolute_import

from sentry import analytics


class FirstReleaseTagSentEvent(analytics.Event):
    type = 'first_release_tag.sent'

    attributes = (
        analytics.Attribute('user_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('project_id'),
    )


analytics.register(FirstReleaseTagSentEvent)
from __future__ import absolute_import

from sentry import analytics


class SentryAppCreatedEvent(analytics.Event):
    type = 'sentry_app.created'

    attributes = (
        analytics.Attribute('user_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('sentry_app'),
    )


analytics.register(SentryAppCreatedEvent)
Пример #22
0
from __future__ import absolute_import

from sentry import analytics


class FirstEventSentEvent(analytics.Event):
    type = 'first_event.sent'

    attributes = (
        analytics.Attribute('user_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('project_id'),
        analytics.Attribute('platform', required=False),
    )


analytics.register(FirstEventSentEvent)
from __future__ import absolute_import

from sentry import analytics


class FirstSourcemapsSentEvent(analytics.Event):
    type = 'first_sourcemaps.sent'

    attributes = (
        analytics.Attribute('user_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('project_id'),
    )


analytics.register(FirstSourcemapsSentEvent)
Пример #24
0
from __future__ import absolute_import

from sentry import analytics


class IssueIgnoredEvent(analytics.Event):
    type = 'issue.ignored'

    attributes = (
        analytics.Attribute('user_id', type=int, required=False),
        analytics.Attribute('default_user_id', type=int),
        analytics.Attribute('organization_id', type=int),
        analytics.Attribute('group_id'),
        analytics.Attribute('ignore_duration', type=int, required=False),
        analytics.Attribute('ignore_count', type=int, required=False),
        analytics.Attribute('ignore_window', type=int, required=False),
        analytics.Attribute('ignore_user_count', type=int, required=False),
        analytics.Attribute('ignore_user_window', type=int, required=False),
    )


analytics.register(IssueIgnoredEvent)
Пример #25
0
    type = "integrations.msteams.resolve"


class MsTeamsIntegrationIgnore(MsTeamsIntegrationAnalytics):
    type = "integrations.msteams.ignore"


class MsTeamsIntegrationUnresolve(MsTeamsIntegrationAnalytics):
    type = "integrations.msteams.unresolve"


class MsTeamsIntegrationUnassign(MsTeamsIntegrationAnalytics):
    type = "integrations.msteams.unassign"


analytics.register(MsTeamsIntegrationAssign)
analytics.register(MsTeamsIntegrationResolve)
analytics.register(MsTeamsIntegrationIgnore)
analytics.register(MsTeamsIntegrationUnresolve)
analytics.register(MsTeamsIntegrationUnassign)


def verify_signature(request):
    # docs for jwt authentication here: https://docs.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-authentication?view=azure-bot-service-4.0#bot-to-connector
    token = request.META.get("HTTP_AUTHORIZATION", "").replace("Bearer ", "")
    if not token:
        logger.error("msteams.webhook.no-auth-header")
        raise NotAuthenticated("Authorization header required")

    try:
        jwt.decode(token, verify=False)
Пример #26
0
from __future__ import absolute_import

from sentry import analytics


class IssueDeletedEvent(analytics.Event):
    type = 'issue.deleted'

    attributes = (
        analytics.Attribute('group_id'),
        analytics.Attribute('delete_type'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('user_id', required=False),
        analytics.Attribute('default_user_id'),
    )


analytics.register(IssueDeletedEvent)
Пример #27
0
from sentry import analytics


class JoinRequestCreatedEvent(analytics.Event):
    type = "join_request.created"

    attributes = (analytics.Attribute("member_id"),
                  analytics.Attribute("organization_id"))


analytics.register(JoinRequestCreatedEvent)
Пример #28
0
from __future__ import absolute_import

from sentry import analytics


class PluginEnabledEvent(analytics.Event):
    type = 'plugin.enabled'

    attributes = (
        analytics.Attribute('user_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('project_id'),
        analytics.Attribute('plugin'),
    )


analytics.register(PluginEnabledEvent)
Пример #29
0
from __future__ import absolute_import

from sentry import analytics


class SentryAppInstalledEvent(analytics.Event):
    type = "sentry_app.installed"

    attributes = (
        analytics.Attribute("user_id"),
        analytics.Attribute("organization_id"),
        analytics.Attribute("sentry_app"),
    )


analytics.register(SentryAppInstalledEvent)
Пример #30
0
from __future__ import absolute_import

from sentry import analytics


class AlertCreatedEvent(analytics.Event):
    type = 'alert.created'

    attributes = (
        analytics.Attribute('user_id', required=False),
        analytics.Attribute('default_user_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('rule_id'),
        analytics.Attribute('actions', type=list),
    )


analytics.register(AlertCreatedEvent)
Пример #31
0
from __future__ import absolute_import

from sentry import analytics


class RepoLinkedEvent(analytics.Event):
    type = "repo.linked"

    attributes = (
        analytics.Attribute("user_id", required=False),
        analytics.Attribute("default_user_id"),
        analytics.Attribute("organization_id"),
        analytics.Attribute("repository_id"),
        analytics.Attribute("provider"),
    )


analytics.register(RepoLinkedEvent)
Пример #32
0
from __future__ import absolute_import

from sentry import analytics


class SentryAppDeletedEvent(analytics.Event):
    type = 'sentry_app.deleted'

    attributes = (
        analytics.Attribute('user_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('sentry_app'),
    )


analytics.register(SentryAppDeletedEvent)
Пример #33
0
from sentry import analytics


class UserCreatedEvent(analytics.Event):
    type = "user.created"

    attributes = (
        analytics.Attribute("id"),
        analytics.Attribute("username"),
        analytics.Attribute("email"),
    )


analytics.register(UserCreatedEvent)
Пример #34
0
from __future__ import absolute_import

from sentry import analytics


class RepoLinkedEvent(analytics.Event):
    type = 'repo.linked'

    attributes = (
        analytics.Attribute('user_id', required=False),
        analytics.Attribute('default_user_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('repository_id'),
        analytics.Attribute('provider'),
    )


analytics.register(RepoLinkedEvent)
Пример #35
0
from sentry import analytics


class IssueUnignoredEvent(analytics.Event):
    type = "issue.unignored"

    attributes = (
        analytics.Attribute("user_id", type=int, required=False),
        analytics.Attribute("default_user_id", type=int),
        analytics.Attribute("organization_id", type=int),
        analytics.Attribute("group_id"),
        analytics.Attribute("transition_type"),
    )


analytics.register(IssueUnignoredEvent)
Пример #36
0
from __future__ import absolute_import, print_function

from sentry import analytics


class OrganizationCreatedEvent(analytics.Event):
    type = 'organization.created'

    attributes = (
        analytics.Attribute('id'), analytics.Attribute('name'), analytics.Attribute('slug'),
        analytics.Attribute('actor_id', required=False),
    )


analytics.register(OrganizationCreatedEvent)
Пример #37
0
from __future__ import absolute_import

from sentry import analytics


class OrganizationJoinedEvent(analytics.Event):
    type = 'organization.joined'

    attributes = (
        analytics.Attribute('user_id'),
        analytics.Attribute('organization_id'),
    )


analytics.register(OrganizationJoinedEvent)
Пример #38
0
from __future__ import absolute_import, print_function

from sentry import analytics


class ProjectIssueSearchEvent(analytics.Event):
    type = 'project_issue.searched'

    attributes = (
        analytics.Attribute('user_id', required=False),
        analytics.Attribute('organization_id'),
        analytics.Attribute('project_id'),
        analytics.Attribute('query'),
    )


analytics.register(ProjectIssueSearchEvent)
Пример #39
0
from __future__ import absolute_import

from sentry import analytics


class SSOEnabledEvent(analytics.Event):
    type = "sso.enabled"

    attributes = (
        analytics.Attribute("user_id"),
        analytics.Attribute("organization_id"),
        analytics.Attribute("provider"),
    )


analytics.register(SSOEnabledEvent)
Пример #40
0
from __future__ import absolute_import, print_function

from sentry import analytics


class UserCreatedEvent(analytics.Event):
    type = 'user.created'

    attributes = (
        analytics.Attribute('id'), analytics.Attribute('username'), analytics.Attribute('email'),
    )


analytics.register(UserCreatedEvent)
Пример #41
0
from sentry import analytics


class SentryAppTokenExchangedEvent(analytics.Event):
    type = "sentry_app.token_exchanged"

    attributes = (
        analytics.Attribute("sentry_app_installation_id"),
        analytics.Attribute("exchange_type"),
    )


analytics.register(SentryAppTokenExchangedEvent)
Пример #42
0
from __future__ import absolute_import

from sentry import analytics


class InboxOutEvent(analytics.Event):
    type = "inbox.inbox_out"

    attributes = (
        analytics.Attribute("user_id", type=int, required=False),
        analytics.Attribute("default_user_id", type=int),
        analytics.Attribute("organization_id", type=int),
        analytics.Attribute("group_id"),
        analytics.Attribute("action"),
        analytics.Attribute("inbox_in_ts", type=int),
    )


analytics.register(InboxOutEvent)
from __future__ import absolute_import, print_function

from sentry import analytics


class SentryAppInstallationTokenDeleted(analytics.Event):
    type = "sentry_app_installation_token.deleted"

    attributes = (
        analytics.Attribute("user_id"),
        analytics.Attribute("organization_id"),
        analytics.Attribute("sentry_app_installation_id"),
        analytics.Attribute("sentry_app"),
    )


analytics.register(SentryAppInstallationTokenDeleted)
Пример #44
0
    attributes = (
        analytics.Attribute('incident_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('incident_type'),
    )


class IncidentCreatedEvent(BaseIncidentEvent):
    type = 'incident.created'


class IncidentStatusUpdatedEvent(BaseIncidentEvent):
    type = 'incident.status_change'
    attributes = BaseIncidentEvent.attributes + (
        analytics.Attribute('prev_status'),
        analytics.Attribute('status'),
    )


class IncidentCommentCreatedEvent(BaseIncidentEvent):
    type = 'incident.comment'
    attributes = BaseIncidentEvent.attributes + (
        analytics.Attribute('user_id', required=False),
        analytics.Attribute('activity_id', required=False),
    )


analytics.register(IncidentCreatedEvent)
analytics.register(IncidentStatusUpdatedEvent)
analytics.register(IncidentCommentCreatedEvent)
Пример #45
0
from sentry import analytics


class FirstReleaseTagSentEvent(analytics.Event):
    type = "first_release_tag.sent"

    attributes = (
        analytics.Attribute("user_id"),
        analytics.Attribute("organization_id"),
        analytics.Attribute("project_id"),
    )


analytics.register(FirstReleaseTagSentEvent)
Пример #46
0
from __future__ import absolute_import

from sentry import analytics


class PluginEnabledEvent(analytics.Event):
    type = "plugin.enabled"

    attributes = (
        analytics.Attribute("user_id"),
        analytics.Attribute("organization_id"),
        analytics.Attribute("project_id"),
        analytics.Attribute("plugin"),
    )


analytics.register(PluginEnabledEvent)
Пример #47
0
from sentry import analytics


class CodeownersUpdated(analytics.Event):
    type = "codeowners.updated"

    attributes = (
        analytics.Attribute("user_id", required=False),
        analytics.Attribute("organization_id"),
        analytics.Attribute("project_id"),
        analytics.Attribute("codeowners_id"),
    )


analytics.register(CodeownersUpdated)
Пример #48
0
from __future__ import absolute_import

from sentry import analytics


class IssueDeletedEvent(analytics.Event):
    type = "issue.deleted"

    attributes = (
        analytics.Attribute("group_id"),
        analytics.Attribute("delete_type"),
        analytics.Attribute("organization_id"),
        analytics.Attribute("user_id", required=False),
        analytics.Attribute("default_user_id"),
    )


analytics.register(IssueDeletedEvent)
Пример #49
0
from __future__ import absolute_import, print_function

from sentry import analytics


class OrganizationCreatedEvent(analytics.Event):
    type = "organization.created"

    attributes = (
        analytics.Attribute("id"),
        analytics.Attribute("name"),
        analytics.Attribute("slug"),
        analytics.Attribute("actor_id", required=False),
    )


analytics.register(OrganizationCreatedEvent)
Пример #50
0
from sentry import analytics


class IssueOwnersAssignment(analytics.Event):
    type = "issueowners.assignment"

    attributes = (
        analytics.Attribute("organization_id"),
        analytics.Attribute("project_id"),
        analytics.Attribute("group_id"),
    )


analytics.register(IssueOwnersAssignment)
Пример #51
0
from __future__ import absolute_import, print_function

from sentry import analytics


class UserSignUpEvent(analytics.Event):
    type = "user.signup"

    attributes = (
        analytics.Attribute("user_id"),
        analytics.Attribute("source"),
        analytics.Attribute("provider", required=False),
        analytics.Attribute("referrer", required=False),
    )


analytics.register(UserSignUpEvent)
Пример #52
0
from __future__ import absolute_import

from sentry import analytics


class FirstUserContextSentEvent(analytics.Event):
    type = 'first_user_context.sent'

    attributes = (
        analytics.Attribute('user_id'),
        analytics.Attribute('organization_id'),
        analytics.Attribute('project_id'),
    )


analytics.register(FirstUserContextSentEvent)