Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v0.30.0 #3641

Merged
merged 23 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8bfb0b5
QueryBuilder filters for log pipelines (#3587)
raj-k-singh Sep 21, 2023
31b898b
fix: active menu logic is updated (#3602)
palashgdev Sep 21, 2023
5c437dd
fix: the scroll issue and name issue in save view (#3604)
Sep 21, 2023
043e5ca
fix: skip first record only for rate metrics (#3609)
srikanthccv Sep 22, 2023
dc4acc0
refactor(query-service): remove redundant nil check (#3614)
Juneezee Sep 24, 2023
d2d3c4b
feat: make identity call if user is logs in for first time or if iden…
YounixM Sep 24, 2023
fcedc9e
feat: severityText is added (#3606)
palashgdev Sep 25, 2023
cbd2f4c
[Fix]: select dropdown for onboarding flow (#3618)
Sep 25, 2023
28d346e
feat: default options is updated (#3607)
palashgdev Sep 25, 2023
e249180
feat: add clarity ms (#3620)
YounixM Sep 26, 2023
a8f8580
feat: add account creation page events (#3619)
YounixM Sep 26, 2023
a4a285c
feat: add support for freehand json query (#3625)
nityanandagohain Sep 26, 2023
4cc3ce2
docs: update onboarding docs (#3627)
ankit01-oss Sep 26, 2023
656f354
feat: ignore prettier formatting for build, coverage and md files (#3…
YounixM Sep 26, 2023
7f397d5
Onboarding Docs - Copy to clipboard (#3634)
YounixM Sep 27, 2023
4ca5176
ci(frontend-ee): 👷 add clarity project ID to env (#3635)
prashant-shahi Sep 27, 2023
1e242b6
feat: updated infra docs (#3637)
ankit01-oss Sep 27, 2023
821471f
feat(query-builder): add limit, order by and having clause to formula…
palashgdev Sep 27, 2023
bccefc6
chore: error details stack trace height is updated (#3639)
palashgdev Sep 27, 2023
e3f4fc2
feat: fix use raw-loader instead of mdx-js/loader (#3640)
YounixM Sep 27, 2023
4076cd9
fix: alert eval for "="/"!=" combination with "at least once"/"all th…
srikanthccv Sep 27, 2023
a4e0d9c
chore: pin SigNoz version to v0.30.0
srikanthccv Sep 27, 2023
e3a251e
Merge branch 'main' into release/v0.30.0
srikanthccv Sep 27, 2023
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
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
run: |
echo 'INTERCOM_APP_ID="${{ secrets.INTERCOM_APP_ID }}"' > frontend/.env
echo 'SEGMENT_ID="${{ secrets.SEGMENT_ID }}"' >> frontend/.env
echo 'CLARITY_PROJECT_ID="${{ secrets.CLARITY_PROJECT_ID }}"' >> frontend/.env
- name: Install dependencies
run: cd frontend && yarn install
- name: Run ESLint
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ jobs:
run: |
echo 'INTERCOM_APP_ID="${{ secrets.INTERCOM_APP_ID }}"' > frontend/.env
echo 'SEGMENT_ID="${{ secrets.SEGMENT_ID }}"' >> frontend/.env
echo 'CLARITY_PROJECT_ID="${{ secrets.CLARITY_PROJECT_ID }}"' >> frontend/.env
- name: Install dependencies
working-directory: frontend
run: yarn install
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,5 @@ test:
go test ./pkg/query-service/app/querier/...
go test ./pkg/query-service/converter/...
go test ./pkg/query-service/formatter/...
go test ./pkg/query-service/tests/integration/...
go test ./pkg/query-service/tests/integration/...
go test ./pkg/query-service/rules/...
4 changes: 2 additions & 2 deletions deploy/docker-swarm/clickhouse-setup/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ services:
condition: on-failure

query-service:
image: signoz/query-service:0.29.3
image: signoz/query-service:0.30.0
command:
[
"-config=/root/config/prometheus.yml",
Expand Down Expand Up @@ -184,7 +184,7 @@ services:
<<: *clickhouse-depend

frontend:
image: signoz/frontend:0.29.3
image: signoz/frontend:0.30.0
deploy:
restart_policy:
condition: on-failure
Expand Down
4 changes: 2 additions & 2 deletions deploy/docker/clickhouse-setup/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ services:
# Notes for Maintainers/Contributors who will change Line Numbers of Frontend & Query-Section. Please Update Line Numbers in `./scripts/commentLinesForSetup.sh` & `./CONTRIBUTING.md`

query-service:
image: signoz/query-service:${DOCKER_TAG:-0.29.3}
image: signoz/query-service:${DOCKER_TAG:-0.30.0}
container_name: signoz-query-service
command:
[
Expand Down Expand Up @@ -201,7 +201,7 @@ services:
<<: *clickhouse-depend

frontend:
image: signoz/frontend:${DOCKER_TAG:-0.29.3}
image: signoz/frontend:${DOCKER_TAG:-0.30.0}
container_name: signoz-frontend
restart: on-failure
depends_on:
Expand Down
6 changes: 6 additions & 0 deletions frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ignore artifacts:
build
coverage

# Ignore all MD files:
**/*.md
2 changes: 1 addition & 1 deletion frontend/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const config: Config.InitialOptions = {
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
modulePathIgnorePatterns: ['dist'],
moduleNameMapper: {
'\\.(css|less)$': '<rootDir>/__mocks__/cssMock.ts',
'\\.(css|less|scss)$': '<rootDir>/__mocks__/cssMock.ts',
},
globals: {
extensionsToTreatAsEsm: ['.ts'],
Expand Down
4 changes: 4 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@
"react-helmet-async": "1.3.0",
"react-i18next": "^11.16.1",
"react-intersection-observer": "9.4.1",
"react-markdown": "8.0.7",
"react-query": "^3.34.19",
"react-redux": "^7.2.2",
"react-router-dom": "^5.2.0",
"react-syntax-highlighter": "15.5.0",
"react-use": "^17.3.2",
"react-virtuoso": "4.0.3",
"redux": "^4.0.5",
Expand Down Expand Up @@ -150,6 +152,7 @@
"@types/react-redux": "^7.1.11",
"@types/react-resizable": "3.0.3",
"@types/react-router-dom": "^5.1.6",
"@types/react-syntax-highlighter": "15.5.7",
"@types/styled-components": "^5.1.4",
"@types/uuid": "^8.3.1",
"@types/webpack": "^5.28.0",
Expand Down Expand Up @@ -183,6 +186,7 @@
"lint-staged": "^12.5.0",
"portfinder-sync": "^0.0.2",
"prettier": "2.2.1",
"raw-loader": "4.0.2",
"react-hooks-testing-library": "0.6.0",
"react-hot-loader": "^4.13.0",
"react-resizable": "3.0.4",
Expand Down
1 change: 1 addition & 0 deletions frontend/public/locales/en/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"delete_processor_description": "Logs are processed sequentially in processors. Deleting a processor may change content of data processed by other processors",
"search_pipeline_placeholder": "Filter Pipelines",
"pipeline_name_placeholder": "Name",
"pipeline_filter_placeholder": "Filter for selecting logs to be processed by this pipeline. Example: service_name = billing",
"pipeline_tags_placeholder": "Tags",
"pipeline_description_placeholder": "Enter description for your pipeline",
"processor_name_placeholder": "Name",
Expand Down
19 changes: 17 additions & 2 deletions frontend/src/AppRoutes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { ConfigProvider } from 'antd';
import getLocalStorageApi from 'api/browser/localstorage/get';
import setLocalStorageApi from 'api/browser/localstorage/set';
import NotFound from 'components/NotFound';
import Spinner from 'components/Spinner';
import { FeatureKeys } from 'constants/features';
import { LOCALSTORAGE } from 'constants/localStorage';
import ROUTES from 'constants/routes';
import AppLayout from 'container/AppLayout';
import { useThemeConfig } from 'hooks/useDarkMode';
Expand Down Expand Up @@ -75,14 +78,26 @@ function App(): JSX.Element {
});

useEffect(() => {
if (isLoggedInState && user && user.userId && user.email) {
const isIdentifiedUser = getLocalStorageApi(LOCALSTORAGE.IS_IDENTIFIED_USER);

if (
isLoggedInState &&
user &&
user.userId &&
user.email &&
!isIdentifiedUser
) {
setLocalStorageApi(LOCALSTORAGE.IS_IDENTIFIED_USER, 'true');

window.analytics.identify(user?.email, {
email: user?.email,
name: user?.name,
});

window.clarity('identify', user.email, user.name);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isLoggedInState]);
}, [isLoggedInState, user]);

useEffect(() => {
trackPageView(pathname);
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/api/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ import {
export const Logout = (): void => {
deleteLocalStorageKey(LOCALSTORAGE.AUTH_TOKEN);
deleteLocalStorageKey(LOCALSTORAGE.IS_LOGGED_IN);
deleteLocalStorageKey(LOCALSTORAGE.IS_IDENTIFIED_USER);
deleteLocalStorageKey(LOCALSTORAGE.REFRESH_AUTH_TOKEN);
deleteLocalStorageKey(LOCALSTORAGE.LOGGED_IN_USER_EMAIL);
deleteLocalStorageKey(LOCALSTORAGE.LOGGED_IN_USER_NAME);
deleteLocalStorageKey(LOCALSTORAGE.CHAT_SUPPORT);

store.dispatch({
type: LOGGED_IN,
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/ExplorerCard/ExplorerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { useNotifications } from 'hooks/useNotifications';
import { mapCompositeQueryFromQuery } from 'lib/newQueryBuilder/queryBuilderMappers/mapCompositeQueryFromQuery';
import { useState } from 'react';
import { useCopyToClipboard } from 'react-use';
import { popupContainer } from 'utils/selectPopupContainer';

import { ExploreHeaderToolTip, SaveButtonText } from './constants';
import MenuItemGenerator from './MenuItemGenerator';
Expand Down Expand Up @@ -170,6 +171,7 @@ function ExplorerCard({
{viewsData?.data.data && viewsData?.data.data.length && (
<Space>
<Select
getPopupContainer={popupContainer}
loading={isLoading || isRefetching}
showSearch
placeholder="Select a view"
Expand Down Expand Up @@ -204,6 +206,7 @@ function ExplorerCard({
</Button>
)}
<Popover
getPopupContainer={popupContainer}
placement="bottomLeft"
trigger="click"
content={
Expand Down
14 changes: 11 additions & 3 deletions frontend/src/components/ExplorerCard/MenuItemGenerator.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeleteOutlined } from '@ant-design/icons';
import { Col, Row, Typography } from 'antd';
import { Col, Row, Tooltip, Typography } from 'antd';
import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';
import { useDeleteView } from 'hooks/saveViews/useDeleteView';
import { useHandleExplorerTabChange } from 'hooks/useHandleExplorerTabChange';
Expand All @@ -8,7 +8,11 @@ import { MouseEvent, useCallback } from 'react';

import { MenuItemContainer } from './styles';
import { MenuItemLabelGeneratorProps } from './types';
import { deleteViewHandler, getViewDetailsUsingViewKey } from './utils';
import {
deleteViewHandler,
getViewDetailsUsingViewKey,
trimViewName,
} from './utils';

function MenuItemGenerator({
viewName,
Expand Down Expand Up @@ -71,12 +75,16 @@ function MenuItemGenerator({
});
};

const newViewName = trimViewName(viewName);

return (
<MenuItemContainer onClick={onLabelClickHandler}>
<Row justify="space-between">
<Col span={22}>
<Row>
<Typography.Text strong>{viewName}</Typography.Text>
<Tooltip title={viewName}>
<Typography.Text strong>{newViewName}</Typography.Text>
</Tooltip>
</Row>
<Row>
<Typography.Text type="secondary">Created by {createdBy}</Typography.Text>
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/components/ExplorerCard/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,10 @@ export const deleteViewHandler = ({
},
});
};

export const trimViewName = (viewName: string): string => {
if (viewName.length > 20) {
return `${viewName.substring(0, 20)}...`;
}
return viewName;
};
17 changes: 7 additions & 10 deletions frontend/src/components/Logs/RawLogView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ function RawLogView({
const isDarkMode = useIsDarkMode();
const isReadOnlyLog = !isLogsExplorerPage || isReadOnly;

const severityText = data.severity_text ? `${data.severity_text} |` : '';

const text = useMemo(
() =>
typeof data.timestamp === 'string'
? `${dayjs(data.timestamp).format()} | ${data.body}`
: `${dayjs(data.timestamp / 1e6).format()} | ${data.body}`,
[data.timestamp, data.body],
? `${dayjs(data.timestamp).format()} | ${severityText} ${data.body}`
: `${dayjs(data.timestamp / 1e6).format()} | ${severityText} ${data.body}`,
[data.timestamp, data.body, severityText],
);

const handleClickExpand = useCallback(() => {
Expand Down Expand Up @@ -114,11 +116,6 @@ function RawLogView({
[text],
);

const mouseActions = useMemo(
() => ({ onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }),
[handleMouseEnter, handleMouseLeave],
);

return (
<RawLogViewContainer
onClick={handleClickExpand}
Expand All @@ -127,8 +124,8 @@ function RawLogView({
$isDarkMode={isDarkMode}
$isReadOnly={isReadOnly}
$isActiveLog={isHighlighted}
// eslint-disable-next-line react/jsx-props-no-spreading
{...mouseActions}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
>
{!isReadOnly && (
<ExpandIconWrapper flex="30px">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.code-snippet-container {
position: relative;
background-color: rgb(43, 43, 43);
}

.code-copy-btn {
position: absolute;
top: 8px;
right: 8px;
display: flex;
justify-content: flex-end;
align-items: center;

button {
cursor: pointer;

background-color: rgba($color: #1d1d1d, $alpha: 0.7);
color: white;
border: none;
padding: 8px;
border-radius: 3px;
transition: all 0.1s;

&:hover {
background-color: rgba($color: #1d1d1d, $alpha: 1);
}
}

&.copied {
button {
background-color: rgba($color: #52c41a, $alpha: 1);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import './CodeCopyBtn.scss';

import { CheckOutlined, CopyOutlined } from '@ant-design/icons';
import cx from 'classnames';
import { useState } from 'react';

export default function CodeCopyBtn({
children,
}: {
children: React.ReactNode;
}): JSX.Element {
const [isSnippetCopied, setIsSnippetCopied] = useState(false);

const handleClick = (): void => {
if (children && Array.isArray(children)) {
setIsSnippetCopied(true);
navigator.clipboard.writeText(children[0].props.children[0]).finally(() => {
setTimeout(() => {
setIsSnippetCopied(false);
}, 1000);
});
}
};

return (
<div className={cx('code-copy-btn', isSnippetCopied ? 'copied' : '')}>
<button type="button" onClick={handleClick}>
{!isSnippetCopied ? <CopyOutlined /> : <CheckOutlined />}
</button>
</div>
);
}
43 changes: 43 additions & 0 deletions frontend/src/components/MarkdownRenderer/MarkdownRenderer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/* eslint-disable react/jsx-props-no-spreading */
import { CodeProps } from 'react-markdown/lib/ast-to-react';
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
import { a11yDark } from 'react-syntax-highlighter/dist/cjs/styles/prism';

import CodeCopyBtn from './CodeCopyBtn/CodeCopyBtn';

function Pre({ children }: { children: React.ReactNode }): JSX.Element {
return (
<pre className="code-snippet-container">
<CodeCopyBtn>{children}</CodeCopyBtn>
{children}
</pre>
);
}

function Code({
node,
inline,
className = 'blog-code',
children,
...props
}: CodeProps): JSX.Element {
const match = /language-(\w+)/.exec(className || '');
return !inline && match ? (
<SyntaxHighlighter
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
style={a11yDark}
language={match[1]}
PreTag="div"
{...props}
>
{String(children).replace(/\n$/, '')}
</SyntaxHighlighter>
) : (
<code className={className} {...props}>
{children}
</code>
);
}

export { Code, Pre };
Loading
Loading