<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:25:55 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[DRIVERS-2575] Add collection name to all command logging and monitoring events</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-2575</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;div class=&quot;panel&quot; style=&quot;background-color: #fafbfc;border-color: #21313c;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelContent&quot; style=&quot;background-color: #fafbfc;&quot;&gt;
&lt;h3&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;&lt;b&gt;Summary&lt;/b&gt;&lt;/h3&gt;
&lt;p&gt;Add collection name (if available) to all command logging and monitoring events.&lt;/p&gt;

&lt;p&gt;Currently, no command events or logs contain the collection name. That can make using the command logging and monitoring events much more difficult if you need access to information that is spread across multiple events. For example, to use the &lt;tt&gt;duration&lt;/tt&gt; values in &lt;tt&gt;CommandSucceededEvent&lt;/tt&gt; or &lt;tt&gt;CommandFailedEvent&lt;/tt&gt; to record metrics on per-collection command latencies, you need to manually extract the collection name from the &lt;tt&gt;command&lt;/tt&gt; document. A much better experience is to include the database and collection names (if available) on all events or logs, making them individually much more useful.&lt;/p&gt;

&lt;p&gt;Inspired by a recent &lt;a href=&quot;https://www.mongodb.com/community/forums/t/how-to-reliable-access-collection-name-when-using-event-commandmonitor-in-golang/213579/2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;community forum post&lt;/a&gt; asking how to get the collection name from a command monitoring event. Also, see a similar request in &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-1371&quot; title=&quot;improve usability of the APM interface&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-1371&quot;&gt;&lt;del&gt;GODRIVER-1371&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Motivation&quot;&gt;&lt;/a&gt;&lt;b&gt;Motivation&lt;/b&gt;&lt;/h3&gt;
&lt;h4&gt;&lt;a name=&quot;Whoistheaffectedenduser%3F&quot;&gt;&lt;/a&gt;Who is the affected end user?&lt;/h4&gt;

&lt;p&gt;People using the command logging and monitoring feature who need access to collection name as well as the information in a &quot;succeeded&quot; or &quot;failed&quot; command event.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Howdoesthisaffecttheenduser%3F&quot;&gt;&lt;/a&gt;How does this affect the end user?&lt;/h4&gt;

&lt;p&gt;They must write a significant amount of logic to correlate events and extract information from raw command or reply BSON documents, requiring knowledge of the MongoDB wire protocol command structure.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Howlikelyisitthatthisproblemorusecasewilloccur%3F&quot;&gt;&lt;/a&gt;How likely is it that this problem or use case will occur?&lt;/h4&gt;

&lt;p&gt;Based on the frequency of user requests, not many users are trying to use command monitoring and logging as described. However, that low frequency of requests may be due to users finding another way around due the high difficulty of correlating and extracting collection name.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Iftheproblemdoesoccur%2Cwhataretheconsequencesandhowseverearethey%3F&quot;&gt;&lt;/a&gt;If the problem does occur, what are the consequences and how severe are they?&lt;/h4&gt;

&lt;p&gt;Users may have to spend a significant amount of time to correlate and extract collection name. Correlating and extracting collection name via the command logging and monitoring APIs is significantly more error prone than adding the information while sending an operation, leading to possible bugs in client code.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Isthisissueurgent%3F&quot;&gt;&lt;/a&gt;Is this issue urgent?&lt;/h4&gt;
&lt;p&gt;No.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Isthisticketrequiredbyadownstreamteam%3F&quot;&gt;&lt;/a&gt;Is this ticket required by a downstream team?&lt;/h4&gt;
&lt;p&gt;No.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Isthisticketonlyfortests%3F&quot;&gt;&lt;/a&gt;Is this ticket only for tests?&lt;/h4&gt;
&lt;p&gt;No.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;AcceptanceCriteria&quot;&gt;&lt;/a&gt;&lt;b&gt;Acceptance Criteria&lt;/b&gt;&lt;/h3&gt;
&lt;p&gt;A &lt;tt&gt;collectionName&lt;/tt&gt; is specified on the &lt;tt&gt;CommandStartedEvent&lt;/tt&gt;, &lt;tt&gt;CommandSucceededEvent&lt;/tt&gt;, and &lt;tt&gt;CommandFailedEvent&lt;/tt&gt; (and corresponding log messages) in the &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/command-logging-and-monitoring/command-logging-and-monitoring.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Command Logging and Monitoring spec&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="2289239">DRIVERS-2575</key>
            <summary>Add collection name to all command logging and monitoring events</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="matt.dale@mongodb.com">Matt Dale</reporter>
                        <labels>
                    </labels>
                <created>Wed, 15 Mar 2023 18:30:10 +0000</created>
                <updated>Thu, 1 Feb 2024 08:53:06 +0000</updated>
                                                                <component>Command Logging and Monitoring</component>
                                        <votes>1</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="6058393" author="JIRAUSER1277080" created="Thu, 1 Feb 2024 08:53:06 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=matt.dale%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;matt.dale@mongodb.com&quot;&gt;matt.dale@mongodb.com&lt;/a&gt; We need schema name in events, can you please share the timeline on when can we pick this change?&lt;/p&gt;</comment>
                            <comment id="5601381" author="durran.jordan@10gen.com" created="Mon, 31 Jul 2023 11:14:19 +0000"  >&lt;p&gt;Update spec to add optional collection name to the command started/failed/succeeded events. Drivers can determine to pass the collection name down or extract it from the command itself.&lt;/p&gt;</comment>
                            <comment id="5337795" author="durran.jordan@10gen.com" created="Tue, 11 Apr 2023 12:29:42 +0000"  >&lt;p&gt;I&apos;m in agreement with Jeff&apos;s point that the intention was to have the event publishing at a low level that is unaware of the command&apos;s origin (Node and Ruby assume this as well). It wouldn&apos;t be difficult at the application layer to extract the collection name using the list of commands noted above that accept a collection name and then using the &lt;tt&gt;commandName&lt;/tt&gt; in the event as the property name in the &lt;tt&gt;command&lt;/tt&gt; object.&lt;/p&gt;</comment>
                            <comment id="5332853" author="JIRAUSER1259527" created="Fri, 7 Apr 2023 18:03:33 +0000"  >&lt;p&gt;I just realized this has some overlap with &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-2452&quot; title=&quot;Add databaseName property to command events&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-2452&quot;&gt;DRIVERS-2452&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-1409&quot; title=&quot;Add CommandStartedEvent to CommandSucceedEvent/CommandFailedEvent&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-1409&quot;&gt;&lt;del&gt;DRIVERS-1409&lt;/del&gt;&lt;/a&gt;. I&apos;ve adjusted the description to make this ticket specifically about collection name in command events.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="977131">GODRIVER-1371</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1505880">DRIVERS-1409</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2146402">DRIVERS-2452</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                            <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10951" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Driver Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10748"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1ip6w:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>