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)
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)
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)
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, 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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
from sentry import analytics class JoinRequestCreatedEvent(analytics.Event): type = "join_request.created" attributes = (analytics.Attribute("member_id"), analytics.Attribute("organization_id")) analytics.register(JoinRequestCreatedEvent)
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)
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)
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)
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)
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)
from sentry import analytics class UserCreatedEvent(analytics.Event): type = "user.created" attributes = ( analytics.Attribute("id"), analytics.Attribute("username"), analytics.Attribute("email"), ) analytics.register(UserCreatedEvent)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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 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)
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)
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)
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)
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)
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)
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)