Skip to content

Commit

Permalink
feat: update ingestion URL (#24354)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
raquelmsmith and github-actions[bot] authored Aug 14, 2024
1 parent a4f9c6e commit 826f5a8
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 13 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/scenes-app-dashboards--show--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend/src/toolbar/toolbarPosthogJS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const DEFAULT_API_KEY = 'sTMFPsFhdP1Ssg'

const runningOnPosthog = !!window.POSTHOG_APP_CONTEXT
const apiKey = runningOnPosthog ? window.JS_POSTHOG_API_KEY : DEFAULT_API_KEY
const apiHost = runningOnPosthog ? window.JS_POSTHOG_HOST : 'https://internal-e.posthog.com'
const apiHost = runningOnPosthog ? window.JS_POSTHOG_HOST : 'https://internal-t.posthog.com'

export const toolbarPosthogJS = new PostHog(apiKey || DEFAULT_API_KEY, {
host: apiHost,
Expand Down
21 changes: 9 additions & 12 deletions posthog/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,18 @@
import gzip
import hashlib
import json
from operator import itemgetter
import os
import re
import secrets
import string
import time
import uuid
import zlib
from collections.abc import Generator, Mapping
from enum import Enum
from functools import lru_cache, wraps
from typing import (
TYPE_CHECKING,
Any,
Optional,
Union,
cast,
)
from collections.abc import Generator, Mapping
from operator import itemgetter
from typing import TYPE_CHECKING, Any, Optional, Union, cast
from urllib.parse import unquote, urljoin, urlparse
from zoneinfo import ZoneInfo

Expand All @@ -49,7 +43,10 @@

from posthog.cloud_utils import get_cached_instance_license, is_cloud
from posthog.constants import AvailableFeature
from posthog.exceptions import UnspecifiedCompressionFallbackParsingError, RequestParsingError
from posthog.exceptions import (
RequestParsingError,
UnspecifiedCompressionFallbackParsingError,
)
from posthog.git import get_git_branch, get_git_commit_short
from posthog.metrics import KLUDGES_COUNTER
from posthog.redis import get_client
Expand Down Expand Up @@ -315,7 +312,7 @@ def render_template(
if settings.E2E_TESTING:
context["e2e_testing"] = True
context["js_posthog_api_key"] = "'phc_ex7Mnvi4DqeB6xSQoXU1UVPzAmUIpiciRKQQXGGTYQO'"
context["js_posthog_host"] = "'https://internal-e.posthog.com'"
context["js_posthog_host"] = "'https://internal-t.posthog.com'"
context["js_posthog_ui_host"] = "'https://us.posthog.com'"

elif settings.SELF_CAPTURE:
Expand All @@ -326,7 +323,7 @@ def render_template(
context["js_posthog_host"] = "window.location.origin"
else:
context["js_posthog_api_key"] = "'sTMFPsFhdP1Ssg'"
context["js_posthog_host"] = "'https://internal-e.posthog.com'"
context["js_posthog_host"] = "'https://internal-t.posthog.com'"
context["js_posthog_ui_host"] = "'https://us.posthog.com'"

context["js_capture_time_to_see_data"] = settings.CAPTURE_TIME_TO_SEE_DATA
Expand Down

0 comments on commit 826f5a8

Please sign in to comment.