Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
cac68ec
chore: bump package version and remove unused dockerfile
jgbernalp May 15, 2025
da93c10
Merge pull request #105 from jgbernalp/bump-version
jgbernalp May 15, 2025
29d4600
OU-804: Add help text to namespace filter
andreasgerstmayr May 15, 2025
bb115c5
OU-805: account for selected time range when showing attribute values
andreasgerstmayr May 15, 2025
3e4c12f
add andreasgerstmayr to owners
PeterYurkovich May 15, 2025
625aa27
Merge pull request #109 from PeterYurkovich/add-owners
openshift-merge-bot[bot] May 15, 2025
c0cb755
Merge pull request #108 from andreasgerstmayr/filterbar-time-range
openshift-merge-bot[bot] May 15, 2025
7ec3b87
Use RHEL 8 golang builder to resolve GLIBC_2.32 not found issue
IshwarKanse May 16, 2025
b2faeb4
Merge pull request #115 from IshwarKanse/trdockerfiles
openshift-merge-bot[bot] May 16, 2025
771a3a9
Merge remote-tracking branch 'upstream/main' into namespace-help-text
andreasgerstmayr May 16, 2025
a2d1c26
Merge pull request #107 from andreasgerstmayr/namespace-help-text
openshift-merge-bot[bot] May 16, 2025
ab3c837
Update tests after the filter feature
IshwarKanse May 15, 2025
6d50c05
fix var
IshwarKanse May 16, 2025
f3579e6
Merge pull request #113 from IshwarKanse/updateuitests
openshift-merge-bot[bot] May 16, 2025
2a81578
TRACING-5408: Refresh query if Tempo instance or tenant changes
andreasgerstmayr May 19, 2025
a6b899c
Merge pull request #122 from andreasgerstmayr/refresh-on-tempo-instan…
openshift-merge-bot[bot] May 20, 2025
1a4cb97
Update Perses dependencies to 0.51.0
andreasgerstmayr Jun 12, 2025
7ad8b39
NO-JIRA: improve API handling
andreasgerstmayr Jun 13, 2025
d2893a6
Merge pull request #126 from andreasgerstmayr/update-perses-to-v0.51.0
openshift-merge-bot[bot] Jun 23, 2025
7803f38
Merge pull request #127 from andreasgerstmayr/update-api-handling
openshift-merge-bot[bot] Jun 23, 2025
4ff02dd
Update Tempo fixtures after RHOSDT 3.6 release
IshwarKanse Jul 2, 2025
1abdcc9
Merge pull request #128 from IshwarKanse/tempofixtures
openshift-merge-bot[bot] Jul 2, 2025
5f24b03
TRACING-5480: Update @mui/x-data-grid
andreasgerstmayr Jul 14, 2025
17f366c
OU-553: Forward start/end values to TraceQL auto-completion
andreasgerstmayr Jul 14, 2025
fd7426d
Fix and improve Tracing UI plugin tests
IshwarKanse Jul 15, 2025
63a48a3
Merge pull request #133 from IshwarKanse/rbacui
openshift-merge-bot[bot] Jul 17, 2025
7466bf1
Improve Tracing UI plugin tests
IshwarKanse Jul 18, 2025
ddaa48b
Merge pull request #136 from IshwarKanse/rbacui
openshift-merge-bot[bot] Jul 18, 2025
4da4c05
Support installing COO in custom namespace
IshwarKanse Jul 20, 2025
fbc4643
Merge pull request #138 from IshwarKanse/coo
openshift-merge-bot[bot] Jul 21, 2025
8fd5330
Merge pull request #131 from andreasgerstmayr/update-mui-datagrid
openshift-merge-bot[bot] Jul 29, 2025
c1efdd9
Merge pull request #132 from andreasgerstmayr/forward-time-range
openshift-merge-bot[bot] Jul 29, 2025
aaa3d7d
Fix test asserts to work on upstream and downstream
IshwarKanse Aug 5, 2025
c262426
Merge pull request #141 from IshwarKanse/scatter
openshift-merge-bot[bot] Aug 6, 2025
f894c79
Update to go v1.24
zhuje Aug 20, 2025
0b0c874
Merge pull request #144 from zhuje/go1.24
openshift-merge-bot[bot] Aug 25, 2025
10d5eb2
Add patch version to go 1.24.0
zhuje Aug 25, 2025
6ec922d
Merge pull request #145 from zhuje/go1.24_patch
openshift-merge-bot[bot] Aug 26, 2025
54a9a47
Test Traces MUI box cutout functionality.
IshwarKanse Aug 26, 2025
3bdb54a
Merge pull request #146 from IshwarKanse/trace
openshift-merge-bot[bot] Aug 28, 2025
35146b4
TRACING-5606: Update Console Plugin SDK and Typescript
andreasgerstmayr Sep 9, 2025
c0e375f
Merge pull request #150 from andreasgerstmayr/update-ts
openshift-merge-bot[bot] Sep 9, 2025
3f57732
TRACING-5604: Upgrade Perses to v0.52.0-rc.1
andreasgerstmayr Sep 8, 2025
409e11d
Merge pull request #149 from andreasgerstmayr/upgrade-perses-v0.52
openshift-merge-bot[bot] Sep 16, 2025
7aafacc
OU-1000: Fix link to Tempo docs
andreasgerstmayr Oct 9, 2025
819c4f8
OU-809: Switching from TraceQL to the Filter Bar should always be per…
andreasgerstmayr Oct 9, 2025
4c7c0af
COO-1017: Support pressing ENTER in filter bar
andreasgerstmayr Oct 9, 2025
b4dfc62
NO-JIRA: be explicit about unsupported instances without multi-tenancy
andreasgerstmayr Oct 9, 2025
8179b35
COO-1118: Show an actionable error message if the namespace filter is…
andreasgerstmayr Oct 9, 2025
a544bfc
TRACING-5455: Do not sort select box items based on their selection s…
andreasgerstmayr Oct 9, 2025
f541f55
Merge pull request #151 from andreasgerstmayr/fix-doc-link
openshift-merge-bot[bot] Oct 9, 2025
12b99c2
Merge pull request #154 from andreasgerstmayr/support-enter-press-in-…
openshift-merge-bot[bot] Oct 9, 2025
f14c169
NO-JIRA: Enable MUI CSS variables, upgrade @patternfly/react-charts
andreasgerstmayr Oct 9, 2025
5238c39
TRACING-5579: Support custom time range
andreasgerstmayr Oct 9, 2025
cbde12b
Merge pull request #156 from andreasgerstmayr/no-sort-typeahead-check…
openshift-merge-bot[bot] Oct 9, 2025
150b091
Merge pull request #152 from andreasgerstmayr/never-disable-hide-quer…
openshift-merge-bot[bot] Oct 9, 2025
9c5d3c2
TRACING-5579: Update Cypress tests for Material-UI time range component
IshwarKanse Oct 10, 2025
6fc589d
Merge pull request #159 from IshwarKanse/tmrange
openshift-merge-bot[bot] Oct 10, 2025
0a5d5bb
Update Cypress to resolve CVE-2025-7783
andreasgerstmayr Oct 13, 2025
4180a86
Merge pull request #158 from andreasgerstmayr/mui-pf-theme
openshift-merge-bot[bot] Oct 14, 2025
8ffdc5e
Merge pull request #162 from andreasgerstmayr/update-cypress
openshift-merge-bot[bot] Oct 14, 2025
47ac476
Merge pull request #157 from andreasgerstmayr/custom-time-range
openshift-merge-bot[bot] Oct 15, 2025
320d6ad
Merge remote-tracking branch 'upstream/main' into explicit-multitenancy
andreasgerstmayr Oct 15, 2025
33bc9ba
Merge remote-tracking branch 'upstream/main' into namespace-no-result…
andreasgerstmayr Oct 15, 2025
b788760
NO-JIRA: Do not fetch filter bar values on every re-render, and preve…
andreasgerstmayr Oct 15, 2025
ecc2786
Merge pull request #153 from andreasgerstmayr/namespace-no-results-he…
openshift-merge-bot[bot] Oct 15, 2025
fc3aa1a
Merge pull request #155 from andreasgerstmayr/explicit-multitenancy
openshift-merge-bot[bot] Oct 15, 2025
3def8e5
Add test for span links and other fixes.
IshwarKanse Sep 16, 2025
a5ac532
Merge pull request #164 from andreasgerstmayr/fix-filterbar-requests
openshift-merge-bot[bot] Oct 16, 2025
d03237c
NO-JIRA: Regenerate locales
andreasgerstmayr Oct 16, 2025
b0b7250
Merge pull request #163 from IshwarKanse/spanmetrics
openshift-merge-bot[bot] Oct 16, 2025
99c6c19
Merge pull request #165 from andreasgerstmayr/update-locales
openshift-merge-bot[bot] Oct 16, 2025
4272c56
Merge remote-tracking branch 'upstream/main' into release-1.0
andreasgerstmayr Oct 16, 2025
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN make install-frontend-ci-clean
COPY web/ web/
RUN make build-frontend

FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.23 as go-builder
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.24 as go-builder

WORKDIR /opt/app-root

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN make install-frontend-ci-clean
COPY web/ web/
RUN make build-frontend

FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.23 as go-builder
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.24 as go-builder

WORKDIR /opt/app-root

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/openshift/distributed-tracing-console-plugin

go 1.22.1
go 1.24.0

require (
github.com/evanphx/json-patch v5.6.0+incompatible
Expand Down
38 changes: 38 additions & 0 deletions pkg/api/common.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package api

import (
"encoding/json"
"fmt"
"net/http"
)

type Response struct {
Status StatusType `json:"status"`
ErrorType string `json:"errorType,omitempty"`
Error string `json:"error,omitempty"`
Data any `json:"data,omitempty"`
}

type StatusType string

const (
StatusSuccess StatusType = "success"
StatusError StatusType = "error"
)

func writeResponse(w http.ResponseWriter, code int, r Response) {
if r.Status != StatusSuccess {
log.Error(fmt.Sprintf("type=%s, error=%s", r.ErrorType, r.Error))
}

bytes, err := json.Marshal(r)
if err != nil {
log.Error(err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}

w.Header().Set("Content-Type", "application/json")
w.WriteHeader(code)
w.Write(bytes)
}
40 changes: 4 additions & 36 deletions pkg/api/tempo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package api

import (
"context"
"encoding/json"
"fmt"
"net/http"

Expand All @@ -14,7 +13,7 @@ import (
"k8s.io/client-go/dynamic"
)

var log = logrus.WithField("module", "api.tempo")
var log = logrus.WithField("module", "api")

type TempoResource struct {
Kind KindType `json:"kind"`
Expand All @@ -31,20 +30,6 @@ const (
KindTempoMonolithic KindType = "TempoMonolithic"
)

type ListTempoResourcesResponse struct {
Status StatusType `json:"status"`
Data []TempoResource `json:"data"`
ErrorType string `json:"errorType,omitempty"`
Error string `json:"error,omitempty"`
}

type StatusType string

const (
StatusSuccess StatusType = "success"
StatusError StatusType = "error"
)

var (
tempostackGVR = schema.GroupVersionResource{
Group: "tempo.grafana.com",
Expand All @@ -58,44 +43,27 @@ var (
}
)

func writeResponse(w http.ResponseWriter, code int, r ListTempoResourcesResponse) {
if r.Status == StatusError {
log.Error(fmt.Sprintf("type=%s, error=%s", r.ErrorType, r.Error))
}

bytes, err := json.Marshal(r)
if err != nil {
log.Error(err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}

w.Header().Set("Content-Type", "application/json")
w.WriteHeader(code)
w.Write(bytes)
}

func ListTempoResourcesHandler(k8sclient *dynamic.DynamicClient) http.HandlerFunc {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
resources, err := ListTempoResources(r.Context(), k8sclient)
if err != nil {
if apierrors.IsNotFound(err) {
writeResponse(w, http.StatusNotFound, ListTempoResourcesResponse{
writeResponse(w, http.StatusNotFound, Response{
Status: StatusError,
ErrorType: "TempoCRDNotFound",
Error: err.Error(),
})
return
}

writeResponse(w, http.StatusInternalServerError, ListTempoResourcesResponse{
writeResponse(w, http.StatusInternalServerError, Response{
Status: StatusError,
Error: err.Error(),
})
return
}

writeResponse(w, http.StatusOK, ListTempoResourcesResponse{
writeResponse(w, http.StatusOK, Response{
Status: StatusSuccess,
Data: resources,
})
Expand Down
4 changes: 2 additions & 2 deletions tests/Dockerfile-cypress
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ RUN wget -O chainsaw.tar.gz https://github.com/kyverno/chainsaw/releases/downloa
&& mv chainsaw /usr/local/bin/ \
&& rm -rf chainsaw.tar.gz

# Install apache2-utils for htpasswd required by OCP CI
RUN apt update && apt install -y apache2-utils \
# Install apache2-utils for htpasswd required by OCP CI, jq and curl for metrics validation
RUN apt update && apt install -y apache2-utils jq curl \
&& rm -rf /var/lib/apt/lists/*
6 changes: 3 additions & 3 deletions tests/PATTERNFLY_COMMANDS_EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ cy.findByTestId('span-duration-bar').first().click(); // By test ID (multiple sp

```typescript
// Single attribute validation
cy.muiTraceAttribute('net.peer.ip', '1.2.3.4');
cy.muiTraceAttribute('network.peer.address', '1.2.3.4');
cy.muiTraceAttribute('peer.service', 'telemetrygen-client');
cy.muiTraceAttribute('k8s.container.name', 'telemetrygen', true); // Optional attribute

Expand All @@ -122,7 +122,7 @@ cy.muiTraceAttribute('service.name', (text) => {

// Bulk attribute validation (recommended for multiple attributes)
cy.muiTraceAttributes({
'net.peer.ip': { value: '1.2.3.4' },
'network.peer.address': { value: '1.2.3.4' },
'peer.service': { value: 'telemetrygen-client' },
'k8s.container.name': {
value: 'telemetrygen',
Expand Down Expand Up @@ -168,7 +168,7 @@ describe('Trace inspection', () => {

// Validate trace attributes efficiently
cy.muiTraceAttributes({
'net.peer.ip': { value: '1.2.3.4' },
'network.peer.address': { value: '1.2.3.4' },
'peer.service': { value: 'telemetrygen-client' },
'service.name': {
value: (text) => text.includes('rbac')
Expand Down
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ cy.muiSpanBar('grpc-service').click()
// Attribute validation (bulk)
cy.muiTraceAttributes({
'service.name': { value: 'my-service' },
'net.peer.ip': { value: '1.2.3.4' },
'network.peer.address': { value: '1.2.3.4' },
'k8s.namespace': { value: 'test-ns', optional: true }
})
```
Expand Down
10 changes: 5 additions & 5 deletions tests/SELECTOR_BEST_PRACTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ cy.muiSpanBar('http-rbac-2') // Click specific span bar
cy.muiFirstSpanBar() // Click first span bar

// Trace Attribute Validation
cy.muiTraceAttribute('net.peer.ip', '1.2.3.4') // Single attribute check
cy.muiTraceAttribute('network.peer.address', '1.2.3.4') // Single attribute check
cy.muiTraceAttributes({ // Bulk attribute validation
'net.peer.ip': { value: '1.2.3.4' },
'network.peer.address': { value: '1.2.3.4' },
'service.name': { value: (text) => text.includes('rbac') }
})
```
Expand Down Expand Up @@ -219,7 +219,7 @@ cy.findByTestId('span-duration-bar').first().click() // By test ID
### Trace Attribute Validation
```typescript
// Old approach (48+ lines of repetitive code):
cy.contains('.MuiTypography-h5', 'net.peer.ip').next('.MuiTypography-body1').should('have.text', '1.2.3.4')
cy.contains('.MuiTypography-h5', 'network.peer.address').next('.MuiTypography-body1').should('have.text', '1.2.3.4')
cy.contains('.MuiTypography-h5', 'peer.service').next('.MuiTypography-body1').should('have.text', 'telemetrygen-client')
cy.get('body').then(($body) => {
if ($body.find('.MuiTypography-h5:contains("k8s.container.name")').length > 0) {
Expand All @@ -230,7 +230,7 @@ cy.get('body').then(($body) => {

// New approach (12 lines, 75% reduction):
cy.muiTraceAttributes({
'net.peer.ip': { value: '1.2.3.4' },
'network.peer.address': { value: '1.2.3.4' },
'peer.service': { value: 'telemetrygen-client' },
'k8s.container.name': { value: 'telemetrygen', optional: true },
'k8s.namespace.name': {
Expand All @@ -243,7 +243,7 @@ cy.muiTraceAttributes({
}, 'TempoStack')

// Or individual attribute checks:
cy.muiTraceAttribute('net.peer.ip', '1.2.3.4')
cy.muiTraceAttribute('network.peer.address', '1.2.3.4')
cy.muiTraceAttribute('service.name', (text) => text.includes('rbac'), false, 'TempoStack')
```

Expand Down
Loading