mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-09 23:51:20 +00:00
Remove event.debug_info
basically unused
This commit is contained in:
@@ -66,7 +66,7 @@ class Command(BaseCommand):
|
||||
dsn = os.environ["SENTRY_DSN"]
|
||||
else:
|
||||
raise CommandError(
|
||||
"You must provide a DSN to send data to Sentry. Use --dsn or set SENTRY_DSN environment variable.")
|
||||
"You must provide a DSN. Use --dsn or set SENTRY_DSN environment variable.")
|
||||
else:
|
||||
dsn = options['dsn']
|
||||
|
||||
@@ -134,9 +134,6 @@ class Command(BaseCommand):
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"X-Sentry-Auth": get_header_value(dsn),
|
||||
# as it stands we always send identifier here, even if it's not a filename. Whether that's useful or
|
||||
# annoying is an open question, but no reason to change it for now
|
||||
"X-BugSink-DebugInfo": identifier,
|
||||
}
|
||||
|
||||
if options["x_forwarded_for"]:
|
||||
|
||||
@@ -32,7 +32,7 @@ class EventAdmin(admin.ModelAdmin):
|
||||
|
||||
ordering = ['-timestamp']
|
||||
|
||||
search_fields = ['event_id', 'debug_info']
|
||||
search_fields = ['event_id']
|
||||
|
||||
list_display = [
|
||||
'timestamp',
|
||||
@@ -41,7 +41,6 @@ class EventAdmin(admin.ModelAdmin):
|
||||
'level',
|
||||
'sdk_name',
|
||||
'sdk_version',
|
||||
'debug_info',
|
||||
'on_site',
|
||||
]
|
||||
|
||||
@@ -73,7 +72,6 @@ class EventAdmin(admin.ModelAdmin):
|
||||
'environment',
|
||||
'sdk_name',
|
||||
'sdk_version',
|
||||
'debug_info',
|
||||
'pretty_data',
|
||||
]
|
||||
|
||||
|
||||
17
events/migrations/0024_remove_event_debug_info.py
Normal file
17
events/migrations/0024_remove_event_debug_info.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 5.2 on 2025-11-09 19:56
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("events", "0023_event_remote_addr"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name="event",
|
||||
name="debug_info",
|
||||
),
|
||||
]
|
||||
@@ -117,9 +117,6 @@ class Event(models.Model):
|
||||
sdk_name = models.CharField(max_length=255, blank=True, null=False, default="")
|
||||
sdk_version = models.CharField(max_length=255, blank=True, null=False, default="")
|
||||
|
||||
# this is a temporary(?), bugsink-specific value;
|
||||
debug_info = models.CharField(max_length=255, blank=True, null=False, default="")
|
||||
|
||||
# denormalized/cached fields:
|
||||
calculated_type = models.CharField(max_length=128, blank=True, null=False, default="")
|
||||
calculated_value = models.TextField(max_length=1024, blank=True, null=False, default="")
|
||||
@@ -239,8 +236,6 @@ class Event(models.Model):
|
||||
sdk_name=maybe_empty(parsed_data.get("", {}).get("name", ""))[:255],
|
||||
sdk_version=maybe_empty(parsed_data.get("", {}).get("version", ""))[:255],
|
||||
|
||||
debug_info=event_metadata["debug_info"][:255],
|
||||
|
||||
# just getting from the dict would be more precise, since we always add this info, but doing the .get()
|
||||
# allows for backwards compatability (digesting events for which the info was not added on-ingest) so
|
||||
# we'll take the defensive approach "for now" (until most everyone is on >= 1.7.4)
|
||||
|
||||
@@ -49,7 +49,6 @@ def _digest_params(event_data, project, request, now=None):
|
||||
"event_id": event_data["event_id"],
|
||||
"project_id": project.id,
|
||||
"ingested_at": format_timestamp(now),
|
||||
"debug_info": "",
|
||||
},
|
||||
"event_data": event_data,
|
||||
"digested_at": now,
|
||||
@@ -329,7 +328,6 @@ class IngestViewTestCase(TransactionTestCase):
|
||||
content_type="application/json",
|
||||
headers={
|
||||
"X-Sentry-Auth": sentry_auth_header,
|
||||
"X-BugSink-DebugInfo": filename,
|
||||
},
|
||||
data=data_bytes,
|
||||
)
|
||||
@@ -380,7 +378,6 @@ class IngestViewTestCase(TransactionTestCase):
|
||||
content_type="application/json",
|
||||
headers={
|
||||
"X-Sentry-Auth": sentry_auth_header,
|
||||
"X-BugSink-DebugInfo": filename,
|
||||
},
|
||||
data=data_bytes,
|
||||
)
|
||||
@@ -471,7 +468,6 @@ class IngestViewTestCase(TransactionTestCase):
|
||||
content_type="application/json",
|
||||
headers={
|
||||
"X-Sentry-Auth": sentry_auth_header,
|
||||
"X-BugSink-DebugInfo": filename,
|
||||
},
|
||||
data=data_bytes,
|
||||
)
|
||||
|
||||
@@ -170,10 +170,6 @@ class BaseIngestAPIView(View):
|
||||
|
||||
@classmethod
|
||||
def get_event_meta(cls, event_id, ingested_at, request, project):
|
||||
# Meta means: not part of the event data. Basically: information that is available at the time of ingestion, and
|
||||
# that must be passed to digest() in a serializable form.
|
||||
debug_info = request.META.get("HTTP_X_BUGSINK_DEBUGINFO", "")
|
||||
|
||||
# .get(..) -- don't want to crash on this and it's non-trivial to find a source that tells me with certainty
|
||||
# that the REMOTE_ADDR is always in request.META (it probably is in practice)
|
||||
remote_addr = request.META.get("REMOTE_ADDR")
|
||||
@@ -182,7 +178,6 @@ class BaseIngestAPIView(View):
|
||||
"event_id": event_id,
|
||||
"project_id": project.id,
|
||||
"ingested_at": format_timestamp(ingested_at),
|
||||
"debug_info": debug_info,
|
||||
"remote_addr": remote_addr,
|
||||
}
|
||||
|
||||
|
||||
@@ -521,7 +521,6 @@ class IntegrationTest(TransactionTestCase):
|
||||
content_type="application/json",
|
||||
headers={
|
||||
"X-Sentry-Auth": sentry_auth_header,
|
||||
"X-BugSink-DebugInfo": filename,
|
||||
},
|
||||
)
|
||||
self.assertEqual(
|
||||
@@ -554,7 +553,7 @@ class IntegrationTest(TransactionTestCase):
|
||||
|
||||
except Exception as e:
|
||||
# we want to know _which_ event failed, hence the raise-from-e here
|
||||
raise AssertionError("Error rendering event %s" % event.debug_info) from e
|
||||
raise AssertionError("Error rendering event") from e
|
||||
|
||||
def test_render_stacktrace_md(self):
|
||||
user = User.objects.create_user(username='test', password='test')
|
||||
@@ -588,7 +587,6 @@ class IntegrationTest(TransactionTestCase):
|
||||
content_type="application/json",
|
||||
headers={
|
||||
"X-Sentry-Auth": sentry_auth_header,
|
||||
"X-BugSink-DebugInfo": filename,
|
||||
},
|
||||
)
|
||||
self.assertEqual(
|
||||
|
||||
Reference in New Issue
Block a user