Skip to content

Commit

Permalink
Merge pull request #5418 from SigNoz/release/v0.49.x
Browse files Browse the repository at this point in the history
Release/v0.49.x
  • Loading branch information
prashant-shahi committed Jul 3, 2024
2 parents c6e9eee + 216ad36 commit 858a0cb
Show file tree
Hide file tree
Showing 84 changed files with 1,940 additions and 727 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ curl -sL https://github.com/SigNoz/signoz/raw/develop/sample-apps/hotrod/hotrod-
```bash
kubectl -n sample-application run strzal --image=djbingham/curl \
--restart='OnFailure' -i --tty --rm --command -- curl -X POST -F \
'locust_count=6' -F 'hatch_rate=2' http://locust-master:8089/swarm
'user_count=6' -F 'spawn_rate=2' http://locust-master:8089/swarm
```

**5.1.3 To stop the load generation:**
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,4 @@ test:
go test ./pkg/query-service/tests/integration/...
go test ./pkg/query-service/rules/...
go test ./pkg/query-service/collectorsimulator/...
go test ./pkg/query-service/postprocess/...
6 changes: 3 additions & 3 deletions deploy/docker-swarm/clickhouse-setup/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ services:
condition: on-failure

query-service:
image: signoz/query-service:0.48.1
image: signoz/query-service:0.49.0
command:
[
"-config=/root/config/prometheus.yml",
Expand Down Expand Up @@ -199,7 +199,7 @@ services:
- ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf

otel-collector:
image: signoz/signoz-otel-collector:0.102.0
image: signoz/signoz-otel-collector:0.102.1
command:
[
"--config=/etc/otel-collector-config.yaml",
Expand Down Expand Up @@ -237,7 +237,7 @@ services:
- query-service

otel-collector-migrator:
image: signoz/signoz-schema-migrator:0.102.0
image: signoz/signoz-schema-migrator:0.102.1
deploy:
restart_policy:
condition: on-failure
Expand Down
4 changes: 2 additions & 2 deletions deploy/docker/clickhouse-setup/docker-compose-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ services:
- --storage.path=/data

otel-collector-migrator:
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.102.0}
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.102.1}
container_name: otel-migrator
command:
- "--dsn=tcp://clickhouse:9000"
Expand All @@ -81,7 +81,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`
otel-collector:
container_name: signoz-otel-collector
image: signoz/signoz-otel-collector:0.102.0
image: signoz/signoz-otel-collector:0.102.1
command:
[
"--config=/etc/otel-collector-config.yaml",
Expand Down
8 changes: 4 additions & 4 deletions deploy/docker/clickhouse-setup/docker-compose.testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,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.48.1}
image: signoz/query-service:${DOCKER_TAG:-0.49.0}
container_name: signoz-query-service
command:
[
Expand Down Expand Up @@ -204,7 +204,7 @@ services:
<<: *db-depend

frontend:
image: signoz/frontend:${DOCKER_TAG:-0.48.1}
image: signoz/frontend:${DOCKER_TAG:-0.49.0}
container_name: signoz-frontend
restart: on-failure
depends_on:
Expand All @@ -216,7 +216,7 @@ services:
- ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf

otel-collector-migrator:
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.102.0}
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.102.1}
container_name: otel-migrator
command:
- "--dsn=tcp://clickhouse:9000"
Expand All @@ -230,7 +230,7 @@ services:


otel-collector:
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.102.0}
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.102.1}
container_name: signoz-otel-collector
command:
[
Expand Down
8 changes: 4 additions & 4 deletions deploy/docker/clickhouse-setup/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,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.48.1}
image: signoz/query-service:${DOCKER_TAG:-0.49.0}
container_name: signoz-query-service
command:
[
Expand Down Expand Up @@ -203,7 +203,7 @@ services:
<<: *db-depend

frontend:
image: signoz/frontend:${DOCKER_TAG:-0.48.1}
image: signoz/frontend:${DOCKER_TAG:-0.49.0}
container_name: signoz-frontend
restart: on-failure
depends_on:
Expand All @@ -215,7 +215,7 @@ services:
- ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf

otel-collector-migrator:
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.102.0}
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.102.1}
container_name: otel-migrator
command:
- "--dsn=tcp://clickhouse:9000"
Expand All @@ -229,7 +229,7 @@ services:


otel-collector:
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.102.0}
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.102.1}
container_name: signoz-otel-collector
command:
[
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"lucide-react": "0.379.0",
"mini-css-extract-plugin": "2.4.5",
"papaparse": "5.4.1",
"posthog-js": "1.140.1",
"posthog-js": "1.142.1",
"rc-tween-one": "3.0.6",
"react": "18.2.0",
"react-addons-update": "15.6.3",
Expand Down
13 changes: 12 additions & 1 deletion frontend/src/components/DropDown/DropDown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ import { Button, Dropdown, MenuProps } from 'antd';
import { useIsDarkMode } from 'hooks/useDarkMode';
import { useState } from 'react';

function DropDown({ element }: { element: JSX.Element[] }): JSX.Element {
function DropDown({
element,
onDropDownItemClick,
}: {
element: JSX.Element[];
onDropDownItemClick?: MenuProps['onClick'];
}): JSX.Element {
const isDarkMode = useIsDarkMode();

const items: MenuProps['items'] = element.map(
Expand All @@ -23,6 +29,7 @@ function DropDown({ element }: { element: JSX.Element[] }): JSX.Element {
items,
onMouseEnter: (): void => setDdOpen(true),
onMouseLeave: (): void => setDdOpen(false),
onClick: (item): void => onDropDownItemClick?.(item),
}}
open={isDdOpen}
>
Expand All @@ -40,4 +47,8 @@ function DropDown({ element }: { element: JSX.Element[] }): JSX.Element {
);
}

DropDown.defaultProps = {
onDropDownItemClick: (): void => {},
};

export default DropDown;
21 changes: 9 additions & 12 deletions frontend/src/components/Logs/RawLogView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ function RawLogView({
const isDarkMode = useIsDarkMode();
const isReadOnlyLog = !isLogsExplorerPage || isReadOnly;

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

const logType = getLogIndicatorType(data);

const updatedSelecedFields = useMemo(
Expand All @@ -88,17 +86,16 @@ function RawLogView({
attributesText += ' | ';
}

const text = useMemo(
() =>
const text = useMemo(() => {
const date =
typeof data.timestamp === 'string'
? `${dayjs(data.timestamp).format(
'YYYY-MM-DD HH:mm:ss.SSS',
)} | ${attributesText} ${severityText} ${data.body}`
: `${dayjs(data.timestamp / 1e6).format(
'YYYY-MM-DD HH:mm:ss.SSS',
)} | ${attributesText} ${severityText} ${data.body}`,
[data.timestamp, data.body, severityText, attributesText],
);
? dayjs(data.timestamp)
: dayjs(data.timestamp / 1e6);

return `${date.format('YYYY-MM-DD HH:mm:ss.SSS')} | ${attributesText} ${
data.body
}`;
}, [data.timestamp, data.body, attributesText]);

const handleClickExpand = useCallback(() => {
if (activeContextLog || isReadOnly) return;
Expand Down
20 changes: 15 additions & 5 deletions frontend/src/components/ResizeTable/DynamicColumnTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
import './DynamicColumnTable.syles.scss';

import { Button, Dropdown, Flex, MenuProps, Switch } from 'antd';
import { ColumnGroupType, ColumnType } from 'antd/es/table';
import { ColumnsType } from 'antd/lib/table';
import logEvent from 'api/common/logEvent';
import FacingIssueBtn from 'components/facingIssueBtn/FacingIssueBtn';
import { SlidersHorizontal } from 'lucide-react';
import { memo, useEffect, useState } from 'react';
Expand All @@ -22,6 +24,7 @@ function DynamicColumnTable({
dynamicColumns,
onDragColumn,
facingIssueBtn,
shouldSendAlertsLogEvent,
...restProps
}: DynamicColumnTableProps): JSX.Element {
const [columnsData, setColumnsData] = useState<ColumnsType | undefined>(
Expand All @@ -47,11 +50,18 @@ function DynamicColumnTable({
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [columns, dynamicColumns]);

const onToggleHandler = (index: number) => (
checked: boolean,
event: React.MouseEvent<HTMLButtonElement>,
): void => {
const onToggleHandler = (
index: number,
column: ColumnGroupType<any> | ColumnType<any>,
) => (checked: boolean, event: React.MouseEvent<HTMLButtonElement>): void => {
event.stopPropagation();

if (shouldSendAlertsLogEvent) {
logEvent('Alert: Column toggled', {
column: column?.title,
action: checked ? 'Enable' : 'Disable',
});
}
setVisibleColumns({
tablesource,
dynamicColumns,
Expand All @@ -75,7 +85,7 @@ function DynamicColumnTable({
<div>{column.title?.toString()}</div>
<Switch
checked={columnsData?.findIndex((c) => c.key === column.key) !== -1}
onChange={onToggleHandler(index)}
onChange={onToggleHandler(index, column)}
/>
</div>
),
Expand Down
19 changes: 14 additions & 5 deletions frontend/src/components/ResizeTable/ResizeTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { Table } from 'antd';
import { ColumnsType } from 'antd/lib/table';
import { dragColumnParams } from 'hooks/useDragColumns/configs';
import { set } from 'lodash-es';
import {
SyntheticEvent,
useCallback,
Expand All @@ -20,6 +21,7 @@ import { ResizeTableProps } from './types';
function ResizeTable({
columns,
onDragColumn,
pagination,
...restProps
}: ResizeTableProps): JSX.Element {
const [columnsData, setColumns] = useState<ColumnsType>([]);
Expand Down Expand Up @@ -58,14 +60,21 @@ function ResizeTable({
[columnsData, onDragColumn, handleResize],
);

const tableParams = useMemo(
() => ({
const tableParams = useMemo(() => {
const props = {
...restProps,
components: { header: { cell: ResizableHeader } },
columns: mergedColumns,
}),
[mergedColumns, restProps],
);
};

set(
props,
'pagination',
pagination ? { ...pagination, hideOnSinglePage: true } : false,
);

return props;
}, [mergedColumns, pagination, restProps]);

useEffect(() => {
if (columns) {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/ResizeTable/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface DynamicColumnTableProps extends TableProps<any> {
dynamicColumns: TableProps<any>['columns'];
onDragColumn?: (fromIndex: number, toIndex: number) => void;
facingIssueBtn?: FacingIssueBtnProps;
shouldSendAlertsLogEvent?: boolean;
}

export type GetVisibleColumnsFunction = (
Expand Down
12 changes: 11 additions & 1 deletion frontend/src/container/AllAlertChannels/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { PlusOutlined } from '@ant-design/icons';
import { Tooltip, Typography } from 'antd';
import getAll from 'api/channels/getAll';
import logEvent from 'api/common/logEvent';
import Spinner from 'components/Spinner';
import TextToolTip from 'components/TextToolTip';
import ROUTES from 'constants/routes';
import useComponentPermission from 'hooks/useComponentPermission';
import useFetch from 'hooks/useFetch';
import history from 'lib/history';
import { useCallback } from 'react';
import { isUndefined } from 'lodash-es';
import { useCallback, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { useSelector } from 'react-redux';
import { AppState } from 'store/reducers';
Expand All @@ -31,6 +33,14 @@ function AlertChannels(): JSX.Element {

const { loading, payload, error, errorMessage } = useFetch(getAll);

useEffect(() => {
if (!isUndefined(payload)) {
logEvent('Alert Channel: Channel list page visited', {
number: payload?.length,
});
}
}, [payload]);

if (error) {
return <Typography>{errorMessage}</Typography>;
}
Expand Down
Loading

0 comments on commit 858a0cb

Please sign in to comment.