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

[go-functions] fix metrics server handler error #9394

Merged

Conversation

freeznet
Copy link
Contributor

@freeznet freeznet commented Feb 1, 2021

Motivation

#9318 add metrics server to go function, but didnt serve "/" endpoint in metrics server, which will cause some metrics calls failed.

Modifications

add handler for "/" in MetricsServicer

Verifying this change

  • Make sure that the change passes the CI checks.

@freeznet
Copy link
Contributor Author

freeznet commented Feb 1, 2021

/pulsarbot run-failure-checks

@sijie
Copy link
Member

sijie commented Feb 1, 2021

@freeznet the go functions test seems to fail.

2021/02/01 05:27:23.102 log.go:46: [info] Starting metrics server on port 50001
--- FAIL: TestMetricsServer (0.00s)
    stats_test.go:198: 
        	Error Trace:	stats_test.go:198
        	Error:      	Not equal: 
        	            	expected: <nil>(<nil>)
        	            	actual  : *url.Error(&url.Error{Op:"Get", URL:"http://localhost:50001/", Err:(*net.OpError)(0xc0001cd770)})
        	Test:       	TestMetricsServer
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xb52c50]

@freeznet
Copy link
Contributor Author

freeznet commented Feb 1, 2021

/pulsarbot run-failure-checks

4 similar comments
@freeznet
Copy link
Contributor Author

freeznet commented Feb 1, 2021

/pulsarbot run-failure-checks

@freeznet
Copy link
Contributor Author

freeznet commented Feb 1, 2021

/pulsarbot run-failure-checks

@freeznet
Copy link
Contributor Author

freeznet commented Feb 1, 2021

/pulsarbot run-failure-checks

@freeznet
Copy link
Contributor Author

freeznet commented Feb 1, 2021

/pulsarbot run-failure-checks

@freeznet freeznet force-pushed the freeznet/fix-go-function-metrics-server branch from 02a0f29 to b04f549 Compare February 1, 2021 14:54
@freeznet
Copy link
Contributor Author

freeznet commented Feb 1, 2021

/pulsarbot run-failure-checks

2 similar comments
@freeznet
Copy link
Contributor Author

freeznet commented Feb 2, 2021

/pulsarbot run-failure-checks

@freeznet
Copy link
Contributor Author

freeznet commented Feb 2, 2021

/pulsarbot run-failure-checks

@sijie sijie merged commit c99e1a0 into apache:master Feb 2, 2021
Anonymitaet pushed a commit that referenced this pull request Feb 3, 2021
### Motivation

#9318 add metrics server to go function, but didnt serve `"/"` endpoint in metrics server, which will cause some metrics calls failed.

### Modifications

add handler for `"/"` in `MetricsServicer`

### Verifying this change

- [x] Make sure that the change passes the CI checks.
@codelipenghui codelipenghui added the cherry-picked/branch-2.7 Archived: 2.7 is end of life label Feb 4, 2021
codelipenghui pushed a commit that referenced this pull request Feb 4, 2021
### Motivation

#9318 add metrics server to go function, but didnt serve `"/"` endpoint in metrics server, which will cause some metrics calls failed.

### Modifications

add handler for `"/"` in `MetricsServicer`

### Verifying this change

- [x] Make sure that the change passes the CI checks.

(cherry picked from commit c99e1a0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants