Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
stale-issue-message: |-
This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it `Status: Accepted`, I will leave it alone ... forever!
But! If you comment or otherwise update it, I will reset the clock, and if you label it `Status: Backlog` or `Status: In Progress`, I will leave it alone ... forever!

----

Expand All @@ -37,7 +37,7 @@ jobs:
stale-pr-message: |-
This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it `Status: Accepted`, I will leave it alone ... forever!
But! If you comment or otherwise update it, I will reset the clock, and if you label it `Status: Backlog` or `Status: In Progress`, I will leave it alone ... forever!

----

Expand Down
14 changes: 5 additions & 9 deletions bin/load-mocks
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ from sentry.signals import mocks_loaded
from sentry.similarity import features
from sentry.utils import loremipsum
from sentry.utils.hashlib import md5_text
from sentry.utils.samples import create_sample_event as _create_sample_event
from sentry.utils.samples import generate_user
from sentry.utils.samples import (
create_sample_event as _create_sample_event,
random_normal,
generate_user,
)

PLATFORMS = itertools.cycle(["ruby", "php", "python", "java", "javascript"])

Expand Down Expand Up @@ -724,13 +727,6 @@ def main(num_events=1, extra_events=False, load_trends=False, slow=False):
create_system_time_series()


def random_normal(mu, sigma, minimum, maximum=None):
random_value = max(random.normalvariate(mu, sigma), minimum)
if maximum is not None:
random_value = min(random_value, maximum)
return random_value


def create_mock_transactions(project_map, load_trends=False, slow=False):
backend_project = project_map["Earth"]
frontend_project = project_map["Fire"]
Expand Down
29 changes: 28 additions & 1 deletion src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ def env(key, default="", type=None):

SYMBOLICATOR_CONFIG_DIR = os.path.join(DEVSERVICES_CONFIG_DIR, "symbolicator")

# XXX(epurkhiser): The generated chartucterie config.js file will be stored
# here. This directory may not exist until that file is generated.
CHARTCUTERIE_CONFIG_DIR = os.path.join(DEVSERVICES_CONFIG_DIR, "chartcuterie")

sys.path.insert(0, os.path.normpath(os.path.join(PROJECT_ROOT, os.pardir)))

DATABASES = {
Expand Down Expand Up @@ -384,7 +388,8 @@ def env(key, default="", type=None):
ASSET_VERSION = 0

# setup a default media root to somewhere useless
MEDIA_ROOT = "/tmp/sentry-media"
MEDIA_ROOT = "/tmp/sentry-files"
MEDIA_URL = "_media/"

LOCALE_PATHS = (os.path.join(PROJECT_ROOT, "locale"),)

Expand Down Expand Up @@ -1681,6 +1686,17 @@ def create_partitioned_queues(name):
"only_if": lambda settings, options: settings.SENTRY_USE_RELAY,
"with_devserver": True,
},
"chartcuterie": {
"image": "us.gcr.io/sentryio/chartcuterie:nightly",
"pull": True,
"volumes": {CHARTCUTERIE_CONFIG_DIR: {"bind": "/etc/chartcuterie"}},
"environment": {
"CHARTCUTERIE_CONFIG": "/etc/chartcuterie/config.js",
"CHARTCUTERIE_CONFIG_POLLING": "true",
},
"ports": {"9090/tcp": 7901},
"only_if": lambda settings, options: options.get("chart-rendering.enabled"),
},
}

# Max file size for avatar photo uploads
Expand Down Expand Up @@ -2132,5 +2148,16 @@ def create_partitioned_queues(name):
# all demo orgs are owned by the user with this email
DEMO_ORG_OWNER_EMAIL = None

# paramters that determine how demo events are generated
DEMO_DATA_GEN_PARAMS = {
"MAX_DAYS": 7, # how many days of data
"SCALE_FACTOR": 1, # scales the frequency of events
"BASE_OFFSET": 0.5, # higher values increases the minum number of events in an hour
"NAME_STEP_SIZE": 20, # higher value means fewr possible test users in sample
"BREADCRUMB_LOOKBACK_TIME": 5, # how far back should breadcrumbs go from the time of the event
"DEFAULT_BACKOFF_TIME": 0, # backoff time between sending events
"ERROR_BACKOFF_TIME": 0.5, # backoff time after a snuba error
}

# adds an extra JS to HTML template
INJECTED_SCRIPT_ASSETS = []
165 changes: 165 additions & 0 deletions src/sentry/demo/data/python_transaction_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
{
"event_id": "2e75afe87658407cb6f11c65ed3d65fa",
"project": 5641789,
"release": "52f7c8a62a97cecf029f6a68adb411c1714c4836",
"dist": null,
"platform": "python",
"message": "",
"datetime": "2021-03-15T19:37:14.460185+00:00",
"tags": [
["browser", "Safari 12.1.1"],
["browser.name", "Safari"],
["client_os", "Mac OS X 10.13.6"],
["client_os.name", "Mac OS X"],
["device", "Mac"],
["device.family", "Mac"],
["environment", "prod"],
["http.status_code", "500"],
["level", "info"],
["runtime", "CPython 2.7.18"],
["runtime.name", "CPython"],
["release", "52f7c8a62a97cecf029f6a68adb411c1714c4836"],
["user", "email:zllm@yahoo.com"],
["server_name", "localhost"],
["transaction", "checkout"],
["url", "http://aj-flask-m3uuizd7iq-uc.a.run.app/checkout"]
],
"_meta": {
"request": {"headers": {"13": {"1": {"": {"rem": [["!config", "x", 0, 11]]}}}}}
},
"_metrics": {"bytes.ingested.event": 3434, "bytes.stored.event": 4534},
"contexts": {
"browser": {"name": "Safari", "version": "12.1.1", "type": "browser"},
"client_os": {"name": "Mac OS X", "version": "10.13.6", "type": "os"},
"device": {"family": "Mac", "model": "Mac", "brand": "Apple", "type": "device"},
"runtime": {
"name": "CPython",
"version": "2.7.18",
"build": "2.7.18 (default, Apr 20 2020, 19:34:11) \n[GCC 8.3.0]",
"type": "runtime"
},
"trace": {
"trace_id": "eaf14e4485864075aec039797501aca2",
"span_id": "9f629125fa90064c",
"parent_span_id": "923dcc257d229405",
"op": "http.server",
"status": "internal_error",
"type": "trace"
}
},
"culprit": "checkout",
"environment": "prod",
"extra": {
"inventory": {"hammer": 1, "nails": 1, "wrench": 0},
"sys.argv": ["/usr/local/bin/flask", "run", "--host=0.0.0.0", "-p", "8080"]
},
"grouping_config": {
"enhancements": "eJybzDhxY3J-bm5-npWRgaGlroGxrpHxBABcTQcY",
"id": "newstyle:2019-10-29"
},
"key_id": "1512188",
"level": "info",
"location": "checkout",
"logger": "",
"metadata": {"location": "checkout", "title": "checkout"},
"received": 1615837034.494997,
"request": {
"url": "http://aj-flask-m3uuizd7iq-uc.a.run.app/checkout",
"method": "POST",
"headers": [
["Accept", "*/*"],
["Accept-Encoding", "br, gzip, deflate"],
["Accept-Language", "en-us"],
["Content-Length", "526"],
["Content-Type", "application/json"],
["Email", "zllm@yahoo.com"],
["Forwarded", "for=\"66.85.48.76\";proto=https"],
["Host", "aj-flask-m3uuizd7iq-uc.a.run.app"],
["Origin", "https://aj-react-m3uuizd7iq-uc.a.run.app"],
["Referer", "https://aj-react-m3uuizd7iq-uc.a.run.app/toolstore"],
["Sentry-Trace", "eaf14e4485864075aec039797501aca2-923dcc257d229405-1"],
[
"User-Agent",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15"
],
["X-Cloud-Trace-Context", "8ae7c9108753b53d5e22f0f3d51efc42/12016370555220220073"],
["X-Forwarded-For", ""],
["X-Forwarded-Proto", "https"]
],
"env": {"SERVER_NAME": "0.0.0.0", "SERVER_PORT": "8080"},
"inferred_content_type": "application/json"
},
"sdk": {
"name": "sentry.python",
"version": "0.19.2",
"integrations": [
"argv",
"atexit",
"dedupe",
"excepthook",
"flask",
"logging",
"modules",
"sqlalchemy",
"stdlib",
"threading"
],
"packages": [{"name": "pypi:sentry-sdk", "version": "0.19.2"}]
},
"spans": [
{
"timestamp": 1615837032.413307,
"start_timestamp": 1615837032.40376,
"op": "db function: get inventory",
"span_id": "958d7b57cb3fc89b",
"parent_span_id": "9f629125fa90064c",
"trace_id": "eaf14e4485864075aec039797501aca2",
"same_process_as_parent": true
},
{
"timestamp": 1615837032.403948,
"start_timestamp": 1615837032.403814,
"op": "connect to db",
"span_id": "95245228f8f39673",
"parent_span_id": "958d7b57cb3fc89b",
"trace_id": "eaf14e4485864075aec039797501aca2",
"same_process_as_parent": true
},
{
"timestamp": 1615837032.410861,
"start_timestamp": 1615837032.40399,
"op": "run query",
"span_id": "a567b19a48a61708",
"parent_span_id": "958d7b57cb3fc89b",
"trace_id": "eaf14e4485864075aec039797501aca2",
"same_process_as_parent": true
},
{
"timestamp": 1615837032.410461,
"start_timestamp": 1615837032.404122,
"description": "SELECT * FROM inventory",
"op": "db",
"span_id": "b9ef6d1b42cb7ce5",
"parent_span_id": "a567b19a48a61708",
"trace_id": "eaf14e4485864075aec039797501aca2",
"same_process_as_parent": true
},
{
"timestamp": 1615837034.449384,
"start_timestamp": 1615837032.413422,
"op": "process order",
"span_id": "9186b2cdef32d090",
"parent_span_id": "9f629125fa90064c",
"trace_id": "eaf14e4485864075aec039797501aca2",
"tags": {"status": "internal_error"},
"same_process_as_parent": true
}
],
"start_timestamp": 1615837032.402719,
"timestamp": 1615837034.460185,
"title": "checkout",
"transaction": "checkout",
"type": "transaction",
"user": {"email": "zllm@yahoo.com"},
"version": "7"
}
Loading