newrelic / newrelic/newrelic-java-agent
[Spike] Investigate capturing DB instance info when using Oracle REST Data Services (ORDS)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 240
- Forks
- 170
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 21
Description
It appears that the Java agent is not able to capture DB info when using Oracle REST Data Services. This results in DB instance with unknown names (e.g. Datastore/instance/JDBC/unknown/unknown)
Our existing OracleDB instrumentation is dependent on a specific database query (i.e. "select sys_context('userenv','instance_name') from dual") and if that query returns nothing, we return the instance as unknown.
When using ORDS is appears that we are unable to retrieve the instance info.
The following info was provided to help reproduce this issue:
Tomcat hosts the ORDS webapp (ords.war), which listens for HTTP requests and forwards them to the database’s APEX engine via JDBC.
ORDS: REST Data Services | Oracle Nederland > version: 25.2.2.
Tomcat: Apache Tomcat® - Apache Tomcat 9 Software Downloads > version: apache-tomcat-9.0.100
Application is an Oracle APEX app (Low code) -> Oracle APEX
We should explore the feasibility of capturing the required instance info from ORDS.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading instrumentation/jdbc-ojdbc7-12.1.0.2/src/main/java/oracle/jdbc/driver/OracleDriver.java, especially the sys_context instance query and its unknown fallback. Reproduce with ORDS 25.2.2 on Tomcat 9.0.100 serving an Oracle APEX app, then determine whether instance information can be captured and document the feasible approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100