<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:34:23 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>[GODRIVER-515] Add Context to CommandMonitor Events</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-515</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;I&apos;m working on adding Datadog APM tracing support to this library. The CommandMonitor looked like the easiest way to hook into the library. Would it be possible to add the relevant context to the CommandMonitor:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;type CommandMonitor struct {&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; Started func(*CommandStartedEvent)&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; Succeeded func(*CommandSucceededEvent)&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; Failed func(*CommandFailedEvent)&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;}&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;type CommandStartedEvent struct {&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; Command *bson.Document&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; DatabaseName string&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; CommandName string&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; RequestID int64&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; ConnectionID string&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;}&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;The event would become:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;type CommandStartedEvent struct {&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; Context context.Context&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; Command *bson.Document&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; DatabaseName string&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; CommandName string&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; RequestID int64&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; ConnectionID string&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;}&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Passing the context through would help us to tie trace spans together.&lt;/p&gt;

&lt;p&gt;I believe this change is relatively minor, and I could work on a PR to implement it.&lt;/p&gt;</description>
                <environment></environment>
        <key id="580461">GODRIVER-515</key>
            <summary>Add Context to CommandMonitor Events</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="kris.brandow@mongodb.com">Kristofer Brandow</assignee>
                                    <reporter username="dd-caleb">Caleb Doxsey</reporter>
                        <labels>
                    </labels>
                <created>Tue, 31 Jul 2018 20:05:49 +0000</created>
                <updated>Sat, 28 Oct 2023 11:39:29 +0000</updated>
                            <resolved>Thu, 6 Sep 2018 18:55:45 +0000</resolved>
                                                    <fixVersion>0.0.13</fixVersion>
                                    <component>Monitoring</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1992590" author="rathi.gnanasekaran" created="Tue, 4 Sep 2018 15:55:59 +0000"  >&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="1970595" author="dd-caleb" created="Wed, 8 Aug 2018 17:41:46 +0000"  >&lt;p&gt;I updated the PR to pass the context as the first argument to each callback function.&lt;/p&gt;</comment>
                            <comment id="1970575" author="dd-caleb" created="Wed, 8 Aug 2018 17:31:40 +0000"  >&lt;p&gt;Hi Kris,&lt;/p&gt;

&lt;p&gt;Sure I can change it. I&apos;ll update my PR.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Caleb&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="1970562" author="kris.brandow" created="Wed, 8 Aug 2018 17:20:59 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=dd-caleb&quot; class=&quot;user-hover&quot; rel=&quot;dd-caleb&quot;&gt;dd-caleb&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;We&apos;ve been thinking about how to incorporate APM information into the driver. I dislike placing a context on a struct, but how about passing it as a parameter to the functions? I think that would align better with how Go usually wants &lt;tt&gt;context.Context&lt;/tt&gt; instances to be handled.&lt;/p&gt;

&lt;p&gt;--Kris&lt;/p&gt;</comment>
                    </comments>
                    <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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htut0n:</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>